Re: [GENERAL] Two tables refenceing each other's columns

2001-01-02 Thread Stephan Szabo
You can use ALTER TABLE ADD CONSTRAINT to add foreign key constraints after table creation. On Tue, 2 Jan 2001, GH wrote: > > Is something like the following allowed (or is not a Bad Idea)? > > table1 > -+- > id1 |serial primary key > col2 |int referen

Re: [GENERAL] Two tables refenceing each other's columns

2001-01-01 Thread GH
On Tue, Jan 02, 2001 at 02:27:28AM -0500, some SMTP stream spewed forth: > Here is some code I played with before. It does what you want. Just make a > new database to try it in. Great, thanks. I ended up working around it by storing one of the primary keys in another table with some other inf

Re: [GENERAL] Two tables refenceing each other's columns

2001-01-01 Thread Robert B. Easter
Here is some code I played with before. It does what you want. Just make a new database to try it in. -- Load the PGSQL procedural language -- This could also be done with the createlang script/program. -- See man createlang. CREATE FUNCTION plpgsql_call_handler() RETURNS OPAQUE AS '/