Re: BUG #17052: Incorrect params inferred on PREPARE (part 2)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17052: Incorrect params inferred on PREPARE (part 2)
Дата
Msg-id 1119504.1623170371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17052: Incorrect params inferred on PREPARE (part 2)  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
>   SET timestampCol = $1 + interval '1 minute';
> ...results in an error...
> ERROR:  column "timestampcol" is of type timestamp without time zone but
> expression is of type interval
> LINE 4:   set timestampCol = $1 + interval '1 minute';
>                              ^

As in your other report, the context in which the parameter type is
guessed is just the immediate context of the plus-operator expression.
The relevant rule there is "guess that an unknown input is of the same
type as the other input", so we resolve the operator as interval + interval.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17051: Incorrect params inferred on PREPARE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: setting the timezone parameter with space cause diff result