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 "Tobias Kalbitz (JIRA)" <ji...@apache.org> on 2006/12/19 21:41:21 UTC
[jira] Created: (DDLUTILS-138) writeschematofile - Database model
fails to find column names of indices with qualifiers (postgres)
writeschematofile - Database model fails to find column names of indices with qualifiers (postgres)
---------------------------------------------------------------------------------------------------
Key: DDLUTILS-138
URL: http://issues.apache.org/jira/browse/DDLUTILS-138
Project: DdlUtils
Issue Type: Bug
Components: Ant Tasks
Environment: JDK 1.6, Postgresql 8.2, SVN version of DdlUtills
Reporter: Tobias Kalbitz
Assigned To: Thomas Dudziak
Example Table:
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
username VARCHAR(30) NOT NULL UNIQUE
) WITHOUT OIDS;
CREATE INDEX users_username ON users(username);
CREATE INDEX users_username_lower ON users(LOWER(username));
The problem is located on line 390 of the database model.
The first index column (username) will be found by the database model
In the second case indexColumn.getName() returns "LOWER(username)" which can't be find as column -> exception
Workaround for me is to use a substring of the columnname, but this isn't a solution which is portable across databases.
--
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-138) writeschematofile - Database model
fails to find column names of indices with qualifiers (postgres)
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-138?page=all ]
Thomas Dudziak updated DDLUTILS-138:
------------------------------------
Issue Type: Improvement (was: Bug)
Fix Version/s: 1.1
DdlUtils currently only supports indexes on columns, not on functions (i.e. LOWER in your case). Supporting them would require that DdlUtils understands some SQL (common functions) across all supported databases.
> writeschematofile - Database model fails to find column names of indices with qualifiers (postgres)
> ---------------------------------------------------------------------------------------------------
>
> Key: DDLUTILS-138
> URL: http://issues.apache.org/jira/browse/DDLUTILS-138
> Project: DdlUtils
> Issue Type: Improvement
> Components: Ant Tasks
> Environment: JDK 1.6, Postgresql 8.2, SVN version of DdlUtills
> Reporter: Tobias Kalbitz
> Assigned To: Thomas Dudziak
> Fix For: 1.1
>
>
> Example Table:
> CREATE TABLE users (
> id BIGSERIAL PRIMARY KEY,
> username VARCHAR(30) NOT NULL UNIQUE
> ) WITHOUT OIDS;
> CREATE INDEX users_username ON users(username);
> CREATE INDEX users_username_lower ON users(LOWER(username));
> The problem is located on line 390 of the database model.
> The first index column (username) will be found by the database model
> In the second case indexColumn.getName() returns "LOWER(username)" which can't be find as column -> exception
> Workaround for me is to use a substring of the columnname, but this isn't a solution which is portable across databases.
--
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