Re: How access table by tableoid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Felix Kater <fkater(at)googlemail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How access table by tableoid
Date: 2007-05-14 01:47:38
Message-ID: 23057.1179107258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jim C. Nasby" <decibel(at)decibel(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2007-05-14 02:00:19 Postgres Printed Manuals
Previous Message Tom Lane 2007-05-14 01:46:21 Re: [GENERAL] PITR and tar