Re: Temp rows - is it possible? - Mailing list pgsql-general

From Boris Popov
Subject Re: Temp rows - is it possible?
Date
Msg-id 86616025377.20031110122432@procedium.com
Whole thread Raw
In response to Re: Temp rows - is it possible?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Temp rows - is it possible?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Hello Bruce,

Monday, November 10, 2003, 11:08:47 AM, you wrote:

BM> Tom Lane wrote:
>> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> > Tom Lane wrote:
>> >> We recently decided we had to forbid foreign-key references from temp
>> >> tables to permanent tables because of this effect.  I wonder whether
>> >> we won't end up forbidding temp tables as children of permanent tables
>> >> too.
>>
>> > Yep, I think we will have to do that.  TODO item?
>>
>> Plan B would be to arrange for the planner to ignore temp tables of
>> other backends whenever it is searching for child tables.  Then the
>> behavior would be predictable: you never see any rows inserted in other
>> people's temp child tables (and cannot update or delete 'em, either).
>> I'm not sure if this is the behavior the OP wanted, but it seems at
>> least marginally useful.

BM> Agreed.  It seems wrong that a session should ever see other people's
BM> temp tables as children.

So going back to the original problem, do you think there should be a
way to implement temp rows in tables visible to everyone? I worked
around the original problem I had by using custom entries in
pg_listener (listen "identifier") and that works well because they
disappear as soon as backend detects the disconnect, but I'd really
like to be able to do exact same thing outside of pg_listener and be
able to reference that table from other permanent tables, which is
currently impossible with pg_listener as its a part of system catalog.

--
-Boris



pgsql-general by date:

Previous
From: Christopher Murtagh
Date:
Subject: Re: Two build problems - openssl and plperl on RedHat
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: [off-topic] Bugtracker using PostgreSQL