db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DDLUTILS-138) writeschematofile - Database model fails to find column names of indices with qualifiers (postgres)
Date Thu, 21 Dec 2006 14:18:23 GMT
     [ 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

        

Mime
View raw message