Re: Feature request - CREATE TYPE ... WITH OID = oid_number. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Feature request - CREATE TYPE ... WITH OID = oid_number.
Date
Msg-id 24583.1291743428@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feature request - CREATE TYPE ... WITH OID = oid_number.  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Feature request - CREATE TYPE ... WITH OID = oid_number.  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Feature request - CREATE TYPE ... WITH OID = oid_number.  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Tue, Dec 7, 2010 at 11:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Say what? �He didn't say that, he said "don't assume that user-defined
>> types have hard-wired OIDs".

> Well, you're right, strictly speaking.  Of course, the OP is not
> assuming it, he is enforcing it.

No, he's wishing he could enforce it.  Which will work, mostly, until
the day it doesn't because of a pre-existing collision.  And then he'll
be up the creek with a lot of software that he can't fix readily.  I
concur with Andrew's advice: don't go there in the first place.  Use a
cache to mitigate the costs of looking up user-defined OIDs, and you
won't regret it later.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Feature request - CREATE TYPE ... WITH OID = oid_number.
Next
From: Robert Haas
Date:
Subject: Re: pg_execute_from_file review