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 references
Is something like the following allowed (or is not a Bad Idea)?
table1
-+-
id1 |serial primary key
col2 |int references table2(id2)
table2
-+-
id2 |serial primary key
col2 |int references table1(id1)
Obviously,
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
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