Re: views on temp tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: views on temp tables
Date: 2002-03-25 08:04:05
Message-ID: 17570.1017043445@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> writes:
> Currently, PostgreSQL allows this -- when the session ends and the temp
> table is dropped, an subsequent queries on the view fail. Is this the
> optimal behavior?

Well, I think it's better than refusing views on temp tables, as the
spec would have us do.

The "correct" behavior is probably to drop such views on backend exit.
Possibly we should invent the notion of temp views, and disallow
references from non-temp views to temp tables. That seems like it
might be less likely to cause unpleasant surprises than just silently
dropping views that reference temp tables.

In any case I'd say this is something best tackled in the context of
generalized reference tracking ... which is something we know we need,
but no one's stepped up to make it happen yet. I don't think this
particular problem is bad enough to warrant a special-purpose
implementation mechanism.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pete Forman 2002-03-25 15:04:04 Re: bad performance on irix
Previous Message Christopher Kings-Lynne 2002-03-25 07:38:35 Re: SET NULL / SET NOT NULL