Re: expression evaluation with expected datatypes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: expression evaluation with expected datatypes
Дата
Msg-id 3924.1341763223@sss.pgh.pa.us
обсуждение исходный текст
Ответ на expression evaluation with expected datatypes  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: expression evaluation with expected datatypes  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> When I worked on parametrised DO statement, I had to solve following issue:

> Syntax is:

> DO (param list) $$ ... $$ LANGUAGE ... USING expr_list

> What is correct way for evaluation of expr_list with specified target types?

I'd argue that that's a pointlessly unwieldy syntax that's creating an
unnecessary problem.  Just use a SELECT list, that is
DO ... USING value AS name, value2 AS name2, ...

The value expressions can define their own types just fine.
        regards, tom lane


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

Предыдущее
От: Joel Jacobson
Дата:
Сообщение: Re: Schema version management
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: expression evaluation with expected datatypes