Re: ERROR: could not open relation - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: could not open relation
Date
Msg-id 21074.1121363472@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: could not open relation  ("Thomas F. O'Connell" <tfo@sitening.com>)
Responses Re: ERROR: could not open relation
List pgsql-general
"Thomas F. O'Connell" <tfo@sitening.com> writes:
> Unfortunately, this is a system where the interloper is superuser
> (and, yes, changing this has been a TODO). But even so, I need help
> understanding how one backend could access the temp table of another.

You'd have to do it pretty explicitly:

    select * from pg_temp_NNN.foo ...

but it's certainly possible.  I wouldn't expect any application to try
this sort of thing, but if someone was manually poking around on the
box, they might have been tempted to do it.

> Several temporary tables (some of which inherit from actual tables)
> are constructed.

Hmm ... a SELECT from one of the "actual tables" would then scan the
temp tables too, no?

Thinking about this, I seem to recall that we had agreed to make the
planner ignore temp tables of other backends when expanding an
inheritance list --- but I don't see anything in the code implementing
that, so it evidently didn't get done yet.

            regards, tom lane

pgsql-general by date:

Previous
From: Russ Brown
Date:
Subject: Re: Quotation marks in queries
Next
From: Jaime Casanova
Date:
Subject: Re: i need you help about postgresql(rollback)