Re: How access table by tableoid - Mailing list pgsql-general

From Tom Lane
Subject Re: How access table by tableoid
Date
Msg-id 23057.1179107258@sss.pgh.pa.us
Whole thread Raw
In response to Re: How access table by tableoid  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-general
"Jim C. Nasby" <decibel@decibel.org> writes:
> You could possibly do this with a SRF; you'd have to grab the name of
> the table and then build a dynamic query off of that. If you cast the
> oid to regclass you'll get the name of the table, though you should
> probably query pg_class and pg_namespace to build a fully-qualified
> table name (schemaname.tablename).

The regclass cast will take care of that for you.

            regards, tom lane

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: How access table by tableoid
Next
From: "Robert James"
Date:
Subject: Postgres Printed Manuals