Re: JDBC using REFERENCES - Mailing list pgsql-general

From David G. Johnston
Subject Re: JDBC using REFERENCES
Date
Msg-id CAKFQuwY7jG3+23k6U1Lrs7SsuHjxd4Oy+F_YVz7V4mwJ3+i=ZA@mail.gmail.com
Whole thread Raw
In response to JDBC using REFERENCES  (Arbol One <ArbolOne@hotmail.ca>)
List pgsql-general
On Sunday, November 24, 2024, Arbol One <ArbolOne@hotmail.ca> wrote:


                sql.append("index SERIAL NOT NULL, ");
                sql.append("id TEXT PRIMARY KEY, ");

                sql.append("CONSTRAIN id PRIMARY KEY (id)");
<== Error
                         


This is quite confusing, having the index column be serial but not PK (or even unique…) while the id column is the PK, which you’ve redundantly specified.

David J.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: JDBC using REFERENCES
Next
From: jayesh thakare
Date:
Subject: Pg_basebackup failed or completed?