Re: User Defined Types in Java

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: User Defined Types in Java
Дата
Msg-id 20060209171837.GC14852@svana.org
обсуждение исходный текст
Ответ на Re: User Defined Types in Java  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: User Defined Types in Java  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Feb 09, 2006 at 09:33:35AM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Actually, I'm think this whole automatic creation of a shell-type a bit
> > silly anyway. Why not simply solve the problem directly like so:
>
> > CREATE TYPE complex AS SHELL;
>
> One of the unwritten consequences of the way that it works now is that
> only superusers can "clutter the catalogs" with shell types.  Not sure
> how important that is, but I suspect that the system is not all that
> robust against use of shell types where a completed type is expected.
> You'd have to go over a lot of code with a fine-tooth comb before
> putting this ability into the hands of ordinary users, else you'd be
> creating loopholes for DOS attacks (or worse).

Would it be reasonable to set this up so you can only create a shell
type within an explicit transaction and that you are required to define
the type completely before commit. That would minimize the exposure to
incomplete types. I don't know if the structure exists to support this
(dynamic on-commit trigger).

> Having said that, I agree that this seems conceptually cleaner, though
> I'm not sure we could ever get rid of the old way because of backward
> compatibility issues.

True. But this way allows us to remove the restriction on only allow C
functions for type input/output.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: korry
Дата:
Сообщение: Re: pg_hba.conf alternative
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_hba.conf alternative