Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 36600 invoked from network); 1 Jul 2008 08:16:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 08:16:06 -0000 Received: (qmail 63951 invoked by uid 500); 1 Jul 2008 08:16:07 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 63925 invoked by uid 500); 1 Jul 2008 08:16:07 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 63914 invoked by uid 99); 1 Jul 2008 08:16:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 01:16:07 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 08:15:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 62E68234C153 for ; Tue, 1 Jul 2008 01:15:45 -0700 (PDT) Message-ID: <1808858226.1214900145404.JavaMail.jira@brutus> Date: Tue, 1 Jul 2008 01:15:45 -0700 (PDT) From: "Rijk van Haaften (JIRA)" To: ddlutils-dev@db.apache.org Subject: [jira] Commented: (DDLUTILS-199) Postgress AutoIncrement fails In-Reply-To: <941587122.1205771005659.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DDLUTILS-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609487#action_12609487 ] Rijk van Haaften commented on DDLUTILS-199: ------------------------------------------- Seems to be related to https://issues.apache.org/jira/browse/DDLUTILS-49 > Postgress AutoIncrement fails > ----------------------------- > > Key: DDLUTILS-199 > URL: https://issues.apache.org/jira/browse/DDLUTILS-199 > Project: DdlUtils > Issue Type: Bug > Components: Core - PostgreSql > Affects Versions: 1.0 > Environment: Ubuntu 7.10, PostgreSQL 8.2.6 > Reporter: Rijk van Haaften > Assignee: Thomas Dudziak > Fix For: 1.1 > > Original Estimate: 0.17h > Remaining Estimate: 0.17h > > class org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder > writeColumnAutoIncrementStmt(Table, Column) > encloses the parameter of nextval in single quotes. > print("UNIQUE DEFAULT nextval('"); > ... > print("')"); > which in my case generates > UNIQUE DEFAULT nextval('Entity_id_seq') > The underscore is a 'special' character, so the string Entity_id_seq needs to be in double quotes. The fix is simple but tricky: the single quotes MUST remain! My local fix (notice the escaped double quote \" twice): > /** > * {@inheritDoc} > */ > protected void writeColumnAutoIncrementStmt(Table table, Column column) throws IOException > { > print("UNIQUE DEFAULT nextval('\""); > print(getConstraintName(null, table, column.getName(), "seq")); > print("\"')"); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.