(I had accidentally replied to Tom only on my reply)
the OID's can be found as follows:
SELECT * FROM pg_attribute
WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = 'mytable');
from this page:
However, there is no example that uses a schema + tablename.
On Mon, Apr 27, 2009 at 11:53 AM, Whit Armstrong
> Thanks, Tom.
> So, it's more like this:
> select attname, atttypid from pg_attribute where attrelid = <attrelid
> of my table>;
> hmm, so how do I find the attrelid of my table? I don't see it in pg_tables.
> On Mon, Apr 27, 2009 at 11:38 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com> writes:
>>> Is it possible to find out the OID types of the columns of a table
>>> using the information schema?
>> No. Type OIDs are a Postgres-ism so they are not reflected in the
>> standards-mandated contents of the information_schema. If you want
>> OIDs you'll need to look at the underlying catalogs (pg_attribute
>> in particular).
>> regards, tom lane
In response to
pgsql-general by date
|Next:||From: Tom Lane||Date: 2009-04-27 16:23:44|
|Subject: Re: how do you get there from here? |
|Previous:||From: Bruce Momjian||Date: 2009-04-27 16:22:06|
|Subject: Re: Cannot reattach to shared memory / Windows|