Felix Finch <felix@crowfix.com> writes:
> CREATE TABLE xyzzy (a INT PRIMARY KEY, b INT REFERENCES plugh);
> CREATE TABLE plugh (c INT PRIMARY KEY, d INT REFERENCES xyzzy);
> I can't actually do this in 7.4, so I had to create the first table
> without the reference.
> Is it possible to pre-declare the second table, similar to a C
> prototype, so the first definition would not complain about the second
> table being unknown?
No. What you do is create the tables, then ALTER TABLE ADD FOREIGN KEY.
regards, tom lane