Re: determining a type oid from the name

From: Thom Brown <thom(at)linux(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: determining a type oid from the name
Date: 2012-02-22 18:36:35
Message-ID: CAA-aLv6VAhzj3jWL3rR8_jS8q5DBQ5OQ-AhG-d7Ov6qVLZu9-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22 February 2012 18:34, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Thom Brown <thom(at)linux(dot)com> wrote:
>> Does this help?
>>
>> test=# SELECT pg_typeof('4834.34'::numeric)::oid;
>>  pg_typeof
>> -----------
>>       1700
>> (1 row)
>
> Wouldn't it be easier to do this instead?
>
> test=# SELECT 'numeric'::regtype::oid;
>  oid
> ------
>  1700
> (1 row)

Well I may have misread the problem. I thought it was that for a
particular data value, the oid of the type of that value was needed.

--
Thom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-02-22 18:36:38 Re: VACUUM ANALYZE is faster than ANALYZE?
Previous Message Kevin Grittner 2012-02-22 18:34:04 Re: determining a type oid from the name