Re: test datatype for ANY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: test datatype for ANY
Дата
Msg-id 17733.1108177349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: test datatype for ANY  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> On Fri, Feb 11, 2005 at 03:37:01PM -0500, Tom Lane wrote:
>> [ thinks about that for awhile... ]  Oh, I see.  The reason this appears
>> to work is that plpgsql compiles a separate version of the function for
>> each actual parameter datatype that is used in a given session.  So in
>> your example, you get a separate version for integer, numeric, etc.

> Is that the general case for polymorphic functions?

AFAIR all the PLs that support polymorphism do it that way.  It's not
the only way it could be done, but it was the easiest way to bolt
polymorphism onto the existing code, which generally assumed that
every data value in the function has a fixed datatype.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?)
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: regular expressions in query