BUG #17166: PREPARE without types inconsistent type resolving

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема BUG #17166: PREPARE without types inconsistent type resolving
Дата
Msg-id CAKFQuwa8k=+xYTm8s36X6EEL-HyL9_LdZx8EHN57VFxABNhDzQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17166: PREPARE without types inconsistent type resolving  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Sunday, August 29, 2021, PG Bug reporting form <noreply@postgresql.org> wrote:
It is rather curious that a
simple order affects the type of $1. I would imagine that, as $1 IS NULL has
no type implications, the col = $1 would determine the type of $1.


The system resolves the type of each argument at its first encounter while parsing.  It has to make a choice, and since “is null” doesn’t provide any help, it is unable to make a decision.  Null “values” are still typed.

This is documented under the PREPARE SQL command reference (the only pure sql way to use numbered parameters) and so is definitely not a bug.

David J.


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

Предыдущее
От: Andrey Borodin
Дата:
Сообщение: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17167: UndefinedBehaviorSanitizer: invalid-shift-exponent while running int4shr/int4shl