Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-492

Cannot create a table named `time`

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:
      None

      Description

      I'm trying to test out data coming from a MySQL datawarehouse. I'm not able to create one of the tables which has the name "time". Putting it in backquotes (or any other kind of quote) does not help.

        Activity

        Hide
        sirpkt Keuntae Park added a comment - - edited

        I created issue for rearranging TAJO-497

        Show
        sirpkt Keuntae Park added a comment - - edited I created issue for rearranging TAJO-497
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thank you very much!

        Show
        hyunsik Hyunsik Choi added a comment - Thank you very much!
        Hide
        sirpkt Keuntae Park added a comment -

        Hyunsik Choi OK, I'll create another issue for rearranging keywords

        Show
        sirpkt Keuntae Park added a comment - Hyunsik Choi OK, I'll create another issue for rearranging keywords
        Hide
        hyunsik Hyunsik Choi added a comment -

        Otherwise, it also would be better to create a new issue for rearranging reserved and non-reserved keywords.

        Show
        hyunsik Hyunsik Choi added a comment - Otherwise, it also would be better to create a new issue for rearranging reserved and non-reserved keywords.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Keuntae Park,

        Your information is very helpful to figure out reserved and non-reserved words.

        It would be better to rename this issue to 'rearrange reserved and non-reserved keywords. If you want it, feel free to take this issue.

        Show
        hyunsik Hyunsik Choi added a comment - Keuntae Park, Your information is very helpful to figure out reserved and non-reserved words. It would be better to rename this issue to 'rearrange reserved and non-reserved keywords. If you want it, feel free to take this issue.
        Hide
        sirpkt Keuntae Park added a comment - - edited

        I just checked all the reserved keywords of Tajo as a table name in PostgreSQL,
        and found that following keywords are allowed as table name.

        mydb=# \d
                  List of relations
         Schema |   Name    | Type  | Owner  
        --------+-----------+-------+--------
         public | filter    | table | ktpark
         public | first     | table | ktpark
         public | format    | table | ktpark
         public | grouping  | table | ktpark
         public | hash      | table | ktpark
         public | index     | table | ktpark
         public | insert    | table | ktpark
         public | last      | table | ktpark
         public | list      | table | ktpark
         public | location  | table | ktpark
         public | max       | table | ktpark
         public | min       | table | ktpark
         public | national  | table | ktpark
         public | nullif    | table | ktpark
         public | overwrite | table | ktpark
         public | precision | table | ktpark
         public | range     | table | ktpark
         public | regexp    | table | ktpark
         public | rlike     | table | ktpark
         public | set       | table | ktpark
         public | sum       | table | ktpark
         public | unknown   | table | ktpark
         public | var_pop   | table | ktpark
         public | var_samp  | table | ktpark
         public | varying   | table | ktpark
         public | zone      | table | ktpark
        

        I also checked all the data type tokens (time is one of them) and results in

        mydb=# \d
                   List of relations
         Schema |    Name     | Type  | Owner  
        --------+-------------+-------+--------
         public | bigint      | table | ktpark
         public | bit         | table | ktpark
         public | blob        | table | ktpark
         public | bool        | table | ktpark
         public | boolean     | table | ktpark
         public | bytea       | table | ktpark
         public | char        | table | ktpark
         public | date        | table | ktpark
         public | decimal     | table | ktpark
         public | double      | table | ktpark
         public | float       | table | ktpark
         public | float4      | table | ktpark
         public | float8      | table | ktpark
         public | inet4       | table | ktpark
         public | int         | table | ktpark
         public | int1        | table | ktpark
         public | int2        | table | ktpark
         public | int4        | table | ktpark
         public | int8        | table | ktpark
         public | integer     | table | ktpark
         public | nchar       | table | ktpark
         public | numeric     | table | ktpark
         public | nvarchar    | table | ktpark
         public | real        | table | ktpark
         public | smallint    | table | ktpark
         public | text        | table | ktpark
         public | time        | table | ktpark
         public | timestamp   | table | ktpark
         public | timestamptz | table | ktpark
         public | timetz      | table | ktpark
         public | tinyint     | table | ktpark
         public | varbinary   | table | ktpark
         public | varbit      | table | ktpark
         public | varchar     | table | ktpark
        

        (Actually, only 'binary' is not allowed as a table name)

        If no matter, I think it is better to move all the above to non-reserved.
        Does it make sense ?

        Show
        sirpkt Keuntae Park added a comment - - edited I just checked all the reserved keywords of Tajo as a table name in PostgreSQL, and found that following keywords are allowed as table name. mydb=# \d List of relations Schema | Name | Type | Owner --------+-----------+-------+-------- public | filter | table | ktpark public | first | table | ktpark public | format | table | ktpark public | grouping | table | ktpark public | hash | table | ktpark public | index | table | ktpark public | insert | table | ktpark public | last | table | ktpark public | list | table | ktpark public | location | table | ktpark public | max | table | ktpark public | min | table | ktpark public | national | table | ktpark public | nullif | table | ktpark public | overwrite | table | ktpark public | precision | table | ktpark public | range | table | ktpark public | regexp | table | ktpark public | rlike | table | ktpark public | set | table | ktpark public | sum | table | ktpark public | unknown | table | ktpark public | var_pop | table | ktpark public | var_samp | table | ktpark public | varying | table | ktpark public | zone | table | ktpark I also checked all the data type tokens (time is one of them) and results in mydb=# \d List of relations Schema | Name | Type | Owner --------+-------------+-------+-------- public | bigint | table | ktpark public | bit | table | ktpark public | blob | table | ktpark public | bool | table | ktpark public | boolean | table | ktpark public | bytea | table | ktpark public | char | table | ktpark public | date | table | ktpark public | decimal | table | ktpark public | double | table | ktpark public | float | table | ktpark public | float4 | table | ktpark public | float8 | table | ktpark public | inet4 | table | ktpark public | int | table | ktpark public | int1 | table | ktpark public | int2 | table | ktpark public | int4 | table | ktpark public | int8 | table | ktpark public | integer | table | ktpark public | nchar | table | ktpark public | numeric | table | ktpark public | nvarchar | table | ktpark public | real | table | ktpark public | smallint | table | ktpark public | text | table | ktpark public | time | table | ktpark public | timestamp | table | ktpark public | timestamptz | table | ktpark public | timetz | table | ktpark public | tinyint | table | ktpark public | varbinary | table | ktpark public | varbit | table | ktpark public | varchar | table | ktpark (Actually, only 'binary' is not allowed as a table name) If no matter, I think it is better to move all the above to non-reserved. Does it make sense ?
        Hide
        hyunsik Hyunsik Choi added a comment -

        It's because TIME is belongs to reserved words. According to my testing, it can be moved to non-reserved works which can be used as identifiers for table names or column names. I'll fix it soon.

        Thank you for the reporting.

        Show
        hyunsik Hyunsik Choi added a comment - It's because TIME is belongs to reserved words. According to my testing, it can be moved to non-reserved works which can be used as identifiers for table names or column names. I'll fix it soon. Thank you for the reporting.

          People

          • Assignee:
            Unassigned
            Reporter:
            deinspanjer Daniel Einspanjer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development