Re: CREATE CAST code review - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: CREATE CAST code review
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961E27@m0114.s-mxs.net
Whole thread Raw
In response to CREATE CAST code review  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE CAST code review  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Tom wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > That doesn't quite work, because then no ordinary user can define a cast
> > from some built-in type to his own type.  What I'm thinking about is to
> > implement the USAGE privilege on types, and then you need to have that to
> > be allowed to create casts.
>
> Still seems too weak.

Yes.

>  What about requiring ownership of at least one
> of the types?

I was thinking that too, but, would it be possible to circumvent such
a restriction with a "type in the middle" attack ?
Create your own type and then
1. (auto)cast type1 to own type
2. (auto)cast own type to type2 ?

Andreas


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: partial index on system indexes?
Next
From: Darko Prenosil
Date:
Subject: Re: [GENERAL] Access Two Databases