Re: Temporary Views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Temporary Views
Date
Msg-id 4092.1029295534@sss.pgh.pa.us
Whole thread Raw
In response to Re: Temporary Views  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
"Sander Steffann" <sander@steffann.nl> 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible enhancement : replace view ?
Next
From: Tom Lane
Date:
Subject: Re: Temporary Views