[GENERAL] creating a table from another table

1999-03-08 Thread David O'Farrell
-- is there any smart way to duplicate a table definition (NOT the data in the table).I want to create table(s) from a predefined template and drop them when they are empty . ~~ David O'Farrell

Re: [GENERAL] creating a table from another table

1999-03-08 Thread Bruce Momjian
> > -- is there any smart way to duplicate a table definition (NOT the > data in the table).I want to create table(s) from a predefined template > and drop them when they are empty . > SELECT * INTO newone FROM table WHERE 1=0; -- Bruce Momjian| http://www.op.net/~

[GENERAL] Foreign Keys

1999-03-08 Thread Simon Drabble
Since I have had occasion to use foreign keys in my tables, I've discovered that the latest version of postgres (6.4.2) doesn't support this feature. How are other people implementing foreign keys? DO I have to write a bunch o' triggers for each f-key? Simon. -- "Life should come with an

Re: [GENERAL] creating a table from another table

1999-03-08 Thread Karl Auer
Hi Bruce and Dave. Am 08-Mar-99 schrieb Bruce Momjian: >> is there any smart way to duplicate a table definition (NOT the >> data in the table).I want to create table(s) from a predefined template >> and drop them when they are empty . > > SELECT * INTO newone FROM table WHERE 1=0; I may be wr

Re: [GENERAL] creating a table from another table

1999-03-08 Thread Bruce Momjian
[Charset iso-8859-1 unsupported, filtering to ASCII...] > Hi Bruce and Dave. > > Am 08-Mar-99 schrieb Bruce Momjian: > >> is there any smart way to duplicate a table definition (NOT the > >> data in the table).I want to create table(s) from a predefined template > >> and drop them when they are