Re: change oid of a pg_type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: change oid of a pg_type
Date
Msg-id 7798.1239484919@sss.pgh.pa.us
Whole thread Raw
In response to Re: change oid of a pg_type  (Andrew Chernow <ac@esilo.com>)
Responses Re: change oid of a pg_type  (Andrew Chernow <ac@esilo.com>)
List pgsql-hackers
Andrew Chernow <ac@esilo.com> writes:
> Tom Lane wrote:
>> Merlin Moncure <mmoncure@gmail.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dumpall --clean is completely broken
Next
From: Andrew Chernow
Date:
Subject: Re: change oid of a pg_type