Re: System vs non-system casts

From: Michael Paesold
Subject: Re: System vs non-system casts
Date: ,
Msg-id: 001001c53f7e$177f8730$0f01a8c0@zaphod
(view: Whole thread, Raw)
In response to: System vs non-system casts  ("Jim C. Nasby")
Responses: Re: System vs non-system casts  (Alvaro Herrera)
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, )

Alvaro Herrera wrote:

> On Tue, Apr 12, 2005 at 08:39:09AM +0200, Michael Paesold wrote:
>> Tom Lane wrote:
>
>> >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.
>>
>> Just my toughts: I believe it's better when cast selection does not 
>> depend
>> on the search_path. It seems dangerous for objects that you don't usually
>> qualify with a schema. With all other objects in schemas I can think of,
>> you can easily write the full-qualified name.
>>
>> So I vote for the latter.
>
> So casts created by the original superuser don't get dumped?  That's not
> good IMHO.

Well perhaps there is an even better solution?

> But yes, schema-qualifying casts seems weird:
> '123'::someschema.user_type
>
> Is that even accepted by the grammar?

It's the type you qualify here, not the cast, isn't it?

Nevertheless don't only think about explicit casts. With implicit casts you 
will usually not write out a cast at all.

Best Regards,
Michael Paesold 




pgsql-hackers by date:

From: Tom Lane
Date:
Subject: Re: System vs non-system casts
From: Alvaro Herrera
Date:
Subject: Re: recovery from idiot delete error