Re: Proposal: make "opaque" obsolete

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Proposal: make "opaque" obsolete
Дата
Msg-id 3D632578.107@joeconway.com
обсуждение исходный текст
Ответ на Proposal: make "opaque" obsolete  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> About I/O behavior: the pg_type entries for these pseudo-types will have to
> have typinput and typoutput functions.  In general these I/O routines must
> just throw errors.  Otherwise you could break the intended type safety by
> supplying user-written constants.  For instance, the present definition of
> RECORD is wrong (sorry Joe) because it uses oidin and oidout; so I could
> write "SELECT foo('42'::record)" and thereby crash a function expecting
> RECORD.  Not that there will be any such function, but the analogous case
> with, say, INTERNAL would be bad news.

Sorry I've been unable to be very involved today. Anything you want me 
to do here?


> An exception is that void_out should succeed and just return an empty string;
> this allows functions-returning-void to be called by SELECT and behave
> reasonably.  Less obviously, void_in should succeed (and return nothing
> interesting, probably just a zero datum; it can ignore its input).  This
> allows plpgsql functions to be defined to return VOID.

This will be useful if/when we want to implement "CALL stored_proc;"


> Should we throw a NOTICE stating that opaque is deprecated if a trigger
> is declared with opaque?  Or should we wait a release or two for that?

I'd throw the NOTICE now.


Joe



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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Proposal: make "opaque" obsolete