"Sander Steffann" <[EMAIL PROTECTED]> writes: > Now I am thinking about it, referential integrity also behaves funny with > temp tables. The following is allowed:
>> create temp table a (x int primary key); >> create table b (y int references a(x)); It is? regression=# create temp table a (x int primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'a_pkey' for table 'a' CREATE TABLE regression=# create table b (y int references a(x)); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) ERROR: ALTER TABLE / ADD CONSTRAINT: Unable to reference temporary table from permanent table constraint Now I realize that this existing special-case argues against the position I'm taking. But let's argue from actual facts, not misstatements... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html