Re: CREATE CAST code review
От | Peter Eisentraut |
---|---|
Тема | Re: CREATE CAST code review |
Дата | |
Msg-id | Pine.LNX.4.44.0207252326580.1144-100000@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: CREATE CAST code review (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane writes: > What about requiring ownership of at least one of the types? Yes, that would work. There would be a somewhat bizzare consequence, though: User U1 creates type T1, user U2 creates type T2. Then user U1 creates a cast from T1 to T2. Now user U2 would be allowed to drop that cast (unless we store a cast owner). I guess that lies in the nature of things. A much more complex yet powerful alternative would be to associate casts with schemas. For example, this would allow an ordinary user to create a cast from numeric to text in his own little world. But that might be going too far. > > I'm not sure about the implications of associating objects with schemas in > > pg_dump. I suppose there might be an option to dump only certain schemas, > > That is the intention (it's not implemented yet). My concern was that if you, say, have two schemas and a cast that involves types from both schemas. If you dump all of them, you have a consistent dump. But if you dump both schemas separately, do you dump the cast in both of them (thus making each schema's dump self-contained) or in only one of them (thus allowing concatenation the dumps). This issue generalizes to every kind of dependency in pg_dump. -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-hackers по дате отправления: