Received: from corppo1.uvsg.com (corppo1.uvsg.com [192.40.65.90]) by hub.org (8.9.2/8.9.1) with ESMTP id NAA36346 for ; Mon, 1 Mar 1999 13:07:33 -0500 (EST) (envelope-from michael.davis@prevuenet.com) Received: from prevuepo1.prevuenet.com (prevuepo1.uvsg.com [192.40.65.44]) by corppo1.uvsg.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id FXVDYJ3L; Mon, 1 Mar 1999 12:06:18 -0600 Received: by prevuepo1.uvsg.com with Internet Mail Service (5.5.2232.9) id ; Mon, 1 Mar 1999 12:09:16 -0600 Message-ID: <93C04F1F5173D211A27900105AA8FCFC14520E@lambic.prevuenet.com> From: Michael Davis To: pgsql-sql@hub.org Subject: RE: [SQL] Simple Question?? Date: Mon, 1 Mar 1999 12:05:01 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2232.9) Content-Type: text/plain I would say yes as long as table_b still references the same sequence as table_a. Sequences are stored and maintained separately from the tables they are used in. If you drop and recreate a sequence, the starting number of that sequence will be 1 even though the database using the sequence has 500 records in it. You can reset the value of the sequence (seq_a) to the highest value currently stored in the database for the column that seq_a is being used with. When I ported my Access97 table to Postgres, I had to set the value of each sequence I used to match the highest value stored in my tables. -----Original Message----- From: archiver [SMTP:archiver@db.geocrawler.com] Sent: Saturday, February 27, 1999 3:51 PM To: pgsql-sql@hub.org Subject: [SQL] Simple Question?? Here's a question that maybe you can answer easily... If I am using a sequence (seq_a) in table_a ...then "create table_b as select * from table_a" ...does table_b start using that sequence (seq_a), starting at the point where table_a left off?? I have a 1GB table that I want to optimize by reordering it, and I will want the new table to use the same sequence to generate the primary key. I will then drop the original table and rename the table_b to table_a. Any clues? Tim Perdue tim@perdue.net