You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Ken Weiner (JIRA)" <ji...@apache.org> on 2005/12/20 07:25:30 UTC

[jira] Created: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

HsqlDb PlatformInfo should not use delimited identifiers 
---------------------------------------------------------

         Key: DDLUTILS-55
         URL: http://issues.apache.org/jira/browse/DDLUTILS-55
     Project: DdlUtils
        Type: Bug
    Reporter: Ken Weiner
 Assigned to: Thomas Dudziak 
 Attachments: HsqlDbPlatform-patch.txt

Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,

CREATE TABLE "person" ...

As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:

select * from person;

But this one does:

select * from "person";

If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).

I will attach a patch for this simple change.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=all ]

Thomas Dudziak updated DDLUTILS-55:
-----------------------------------

    Component: Core - HSQLDB

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug

>   Components: Core - HSQLDB
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=comments#action_12360897 ] 

Thomas Dudziak commented on DDLUTILS-55:
----------------------------------------

If with configuration you mean the Ant tasks, then yes, the two main tasks have a corresponding attribute which then is applied to all sub tasks:

http://db.apache.org/ddlutils/ant-tasks.html#DdlToDatabaseTask+reference

If you use the API, you have to set the flag yourself (DdlUtils uses no configuration files internally).

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=all ]
     
Thomas Dudziak resolved DDLUTILS-55:
------------------------------------

    Resolution: Invalid

There are two modes in which (most) databases can operate. In the first one where undelimited identifiers are used, all table/column/... identifiers are converted to uppercase and they have to follow certain rules (no whitespaces, no SQL keywords etc.). In the second way, where these identifiers are surrounded by delimiters, the database treats them as is. Here the identifiers can be anything, even SQL keywords.
DdlUtils per default is in this second mode, so that the identifiers are in the database as they are in the code that created the database. You can switch the mode via the PlatformInfo as you've already noticed.

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Ken Weiner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=all ]

Ken Weiner updated DDLUTILS-55:
-------------------------------

    Attachment: HsqlDbPlatform-patch.txt

Path that sets useDelimitedIdentifiers to false for HSQLDB.

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Ken Weiner (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=comments#action_12360896 ] 

Ken Weiner commented on DDLUTILS-55:
------------------------------------

Thank you for the explanation.  Is there a way to switch the mode via configuration instead of programmatically modifying the PlatformInfo?

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DDLUTILS-55) HsqlDb PlatformInfo should not use delimited identifiers

Posted by "Ken Weiner (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DDLUTILS-55?page=comments#action_12360899 ] 

Ken Weiner commented on DDLUTILS-55:
------------------------------------

Thanks again.  I have things working now after changing the flag to not use delimited identifiers.  I am surprised that the default setting is to use them since I rarely have seen programs that generate SQL with the identifiers delimited.  I imagine this could easily confuse others as well.

> HsqlDb PlatformInfo should not use delimited identifiers
> --------------------------------------------------------
>
>          Key: DDLUTILS-55
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-55
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Ken Weiner
>     Assignee: Thomas Dudziak
>  Attachments: HsqlDbPlatform-patch.txt
>
> Currently, when creating tables using HSQLDB, double quotes (") are used surrounding the table names in each CREATE TABLE statement.  For example,
> CREATE TABLE "person" ...
> As a result, it isn't possible to write SQL without putting double quotes around tables names.  For example, this statement doesn't work:
> select * from person;
> But this one does:
> select * from "person";
> If useDelimitedIdentifiers in PlatformInfo is set to false, then double quotes will not surround the table names in CREATE TABLE statements and then SQL statements will work as expected (without having to include the double quotes).
> I will attach a patch for this simple change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira