Re: [GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Tom Lane
Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > ... BTW I saw there is no OWNED BY in 8.1, is there any other way to > auto-drop sequences when columns get dropped? In previous versions, a sequence object that was auto-created as a result of a SERIAL column declaration will be auto-dropped whe

[GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Ivan Sergio Borgonovo
I've to fill something like: create table DESTtable1 ( pk1 serial primary key, -- rest of stuff ); create table DESTtable2 ( pk2 serial primary key, fk1 int references DESTtable1(pk1) -- rest of stuff ); from data that are such way create table SRCtable1 ( pk1 serial primary key, -- r

[GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Ivan Sergio Borgonovo
I've to fill something like: create table DESTtable1 ( pk1 serial primary key, -- rest of stuff ); create table DESTtable2 ( pk2 serial primary key, fk1 int references DESTtable1(pk1) -- rest of stuff ); from data that are such way create table SRCtable1 ( pk1 serial primary key, -- r