Re: Simplifying identification of temporary tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Simplifying identification of temporary tables
Date
Msg-id 21349.1121365215@sss.pgh.pa.us
Whole thread Raw
In response to Re: Simplifying identification of temporary tables  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> That said, I think what you are proposing is good since it causes less
> log pollution.  Although I would prefer to return the name of the
> namespace, not the oid,

I thought about that, but it pushes you right back to having to do a
join with pg_namespace, which certainly doesn't increase your level of
abstraction from the system catalogs.

> or just go right to the point and create
> function accepting temp table name and returning bool.

That would respond to the abstraction concern in a more complete
fashion.  I thought about that one too, but felt that the ability to
look at the whole pg_class row (and not only check existence) had some
value.  Also, I've seen people doing things like... where relname LIKE 'pattern' and ...
which still works with the namespace OID function but would not work
with a does_temp_table_exist() function.  I wouldn't object to doing
both this and the OID function, though.  Do you have a proposal for
the exact spelling of the exists() function?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Autovacuum loose ends
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Autovacuum loose ends