Re: Temporary Views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sander Steffann" <sander(at)steffann(dot)nl>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Hannu Krosing" <hannu(at)tm(dot)ee>, "Rod Taylor" <rbt(at)zort(dot)ca>, "Gavin Sherry" <swm(at)linuxworld(dot)com(dot)au>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temporary Views
Date: 2002-08-14 03:25:34
Message-ID: 4092.1029295534@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Sander Steffann" <sander(at)steffann(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-08-14 03:26:19 Re: OOP real life example (was Re: Why is MySQL more
Previous Message Tom Lane 2002-08-14 03:18:17 Re: Possible enhancement : replace view ?