Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0EGlBV39814 for ; Mon, 14 Jan 2002 11:47:11 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.2) with HTTP id 600816 for ; Mon, 14 Jan 2002 08:47:14 -0800 From: "Josh Berkus" Subject: CREATE TABLE glitch -fix request for 7.2 To: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.2 Date: Mon, 14 Jan 2002 08:47:14 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200201/141 X-Sequence-Number: 6229 Tom, Peter, Stephan, et al.: Here's a glitch that's bothered me for a while (ver 7.0 -> 7.2b4 ) in PostgreSQL DDL statements. I was thinking that since 7.2 is still in beta, that you could fix it this version. To produce the glitch: 1. Create a SQL script file that drops a table, then creates that table with a SERIAL primary key (I do this all the time to build my databases) 2. Run the script once to create the table. You'll get a error (no table to drop) but that doesn't matter. 3. Run the script a second time, as if you were making changes to the data structure and needed to rebuild. 4. You will get an error telling you that "table1_id_seq" already exists, and the CREATE TABLE statement will fail. This is very user-unfriendly behaviour, especially in a database that still does not support about 50% of ALTER TABLE. I spend a fair amount of extra time deleting SERIAL sequences when I am doing the database-building part of the development process. Can we change this behavior, please? I'd suppose that it would require you to create some sort of permanent link between SERIAL columns and the sequences they spawn. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco