db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6340) Add support for CREATE TYPE AS <existing type> (synonym types)
Date Mon, 21 Oct 2013 12:38:43 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13800605#comment-13800605
] 

Dyre Tjeldvoll commented on DERBY-6340:
---------------------------------------

Clarification from Fred Zemke who is a member of the SQL standard committee:

{quote}
> The question is: since INTEGER is a reserved word, do I need to
>  double-quote it when I use it in queries, or can I omit the double quotes?
strictly speaking, yes
>  That is, is the following legal:
>
>    SET SCHEMA MYSCHEMA;
>    SELECT * FROM T WHERE INTEGER( SSN_COL )>  INT_COL;
>
>  ...or do I need to double-quote the function name:
>
>    SET SCHEMA MYSCHEMA;
>    SELECT * FROM T WHERE "INTEGER"( SSN_COL )>  INT_COL;
>
>  I see that DB2 does not require double-quotes and that is certainly
>  more convenient for the user:
I agree.  I think it is a good idea to permit this usage.  The double
quotes would be required strictly speaking
for portability.  Syntax Rules are a burden on the user who wants
portability.  They are not a limitation
on what the product can also support. 
{quote}


> Add support for CREATE TYPE AS <existing type> (synonym types)
> --------------------------------------------------------------
>
>                 Key: DERBY-6340
>                 URL: https://issues.apache.org/jira/browse/DERBY-6340
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Dyre Tjeldvoll
>            Assignee: Dyre Tjeldvoll
>         Attachments: CreateTypeAs_fs_draft_2.html, CreateTypeAs_fs_draft_3.html, CreateTypeAs_fs_draft.html
>
>
> The SQL standard (2003) chapter 11.41 <user-defined type definition> allows the
creation of synonyms or aliases for an existing type: CREATE TYPE AS <predefined type>.
By allowing this in Derby we would simplify migration from, and interoperation with, other
databases.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message