Re: generic builtin functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: generic builtin functions
Дата
Msg-id 10375.1131644937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: generic builtin functions  (Andrew Dunstan <andrew@dunslane.net>)
Re: generic builtin functions  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I am looking at creating a few generic functions builtin for the enum 
> stuff. These would be tied to each enum type as it is created. However, 
> they should not really appear in pg_proc initially, as there wouldn't be 
> any enum types to tie them to anyway. But I want them to have reserved 
> oids and appear in the list of builtins.

This feels wrong to me.  Ways that might work include:

1. Invent a pseudotype 'anyenum' comparable to 'anyarray', and define
the generic functions as taking 'anyenum'.

2. Don't try to define the generic operations as true functions, but
make them special syntactic constructs comparable to ROW() or ARRAY[].

I think I like #1 better, but it's hard to be sure when discussing
it in a vacuum.  How about being more specific about what you want
to accomplish?
        regards, tom lane


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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Possible savepoint bug
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: generic builtin functions