Re: change oid of a pg_type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: change oid of a pg_type
Date: 2009-04-11 21:21:59
Message-ID: 7798.1239484919@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Chernow <ac(at)esilo(dot)com> writes:
> Tom Lane wrote:
>> Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
>>> Is there any way to adjust the oid of an already created pg_type
>>
>> No.

> Then why are oids sent in some type's external binary format?

How is that related?

> If you
> can't fix oids, external format is useless to the outside world.

You have to be prepared to find out what type the OID belongs to.
There's at least one client library (maybe JDBC) that maintains
a cache of a SELECT from pg_type for exactly this purpose. Most
others don't care because they don't really have any special
support for non-builtin types --- but if you do, you have to deal
with the fact that their OIDs aren't fixed.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Chernow 2009-04-11 21:59:04 Re: change oid of a pg_type
Previous Message Tom Lane 2009-04-11 21:18:45 Re: pg_dumpall --clean is completely broken