Re: System vs non-system casts

From: Tom Lane
Subject: Re: System vs non-system casts
Date: ,
Msg-id: 7130.1113283407@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: System vs non-system casts  (Andrew - Supernews)
List: pgsql-hackers

Tree view

System vs non-system casts  ("Jim C. Nasby", )
 Re: System vs non-system casts  (Robert Treat, )
 Re: System vs non-system casts  (Andrew - Supernews, )
  Re: System vs non-system casts  (Tom Lane, )
 Re: System vs non-system casts  ("Michael Paesold", )
  Re: System vs non-system casts  (Alvaro Herrera, )
   Re: System vs non-system casts  (Tom Lane, )
 Re: System vs non-system casts  ("Michael Paesold", )
  Re: System vs non-system casts  (Alvaro Herrera, )
   Re: System vs non-system casts  (Tom Lane, )
    Re: System vs non-system casts  ("Jim C. Nasby", )
 Re: System vs non-system casts  (Andrew - Supernews, )
  Re: System vs non-system casts  (Alvaro Herrera, )
   Re: System vs non-system casts  (Tom Lane, )

Andrew - Supernews <> writes:
> On 2005-04-12, Robert Treat <> 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:

From: "Michael Paesold"
Date:
Subject: Re: System vs non-system casts
From: Simon Riggs
Date:
Subject: Test coverage for external sorting