Re: System vs non-system casts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: System vs non-system casts
Date
Msg-id 7130.1113283407@sss.pgh.pa.us
Whole thread Raw
In response to Re: System vs non-system casts  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-hackers
Andrew - Supernews <andrew+nonews@supernews.com> writes:
> On 2005-04-12, Robert Treat <xzilla@users.sourceforge.net> wrote:
>> One potential ugly way to do it would be to use the magical "last system oid" 

> That is what pg_dump does when talking to pre-7.2 databases. But it isn't
> entirely reliable because oid wrap can allow the user to create objects
> with oids < datlastsysoid.

Also, it would ideally be possible to deliberately create a new cast
that pg_dump would ignore --- you can do this for other object kinds
by creating them in the pg_catalog schema.

It's a little bit odd to think of casts as belonging to schemas,
since they don't have names in the normal sense.  We could probably
bull ahead and do it anyway though.

The other possible solution that comes to mind is to invent the notion
that a cast has a specific owner (which arguably it should have anyway)
and then say that "system casts" are those whose owner is the original
superuser.

The former approach seems preferable if you want the schema search path
to affect the findability of casts, and the latter approach if you
don't.  Right at the moment I'm too tired to figure out which one of
those things I believe ... any thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: ISO-8859-1 encoding not enforced?
Next
From: Tom Lane
Date:
Subject: Re: ISO-8859-1 encoding not enforced?