Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Дата
Msg-id CAKFQuwZU0OBrJCVfChuXkShi+L_-9psDDUYGXvrnYbbD-Odxug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  (Eduardo Pérez Ureta <edpeur@gmail.com>)
Ответы Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Список pgsql-bugs
On Sunday, October 15, 2017, Eduardo Pérez Ureta <edpeur@gmail.com> wrote:
I understand that not sending the type for a parameter (when it is not null) may not make much sense.
But, currently PostgreSQL accepts parameters with unknown types in statements like:
INSERT INTO t1 (col1) VALUES (?)
SELECT * FROM t1 WHERE col1 = ?
where the column can be different types like VARCHAR or TIMESTAMP

col1 has a type and so the type of the unspecified variable can be inferred.  Your is null example cannot have its typed inferred.

David J.

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

Предыдущее
От: Eduardo Pérez Ureta
Дата:
Сообщение: Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC callsvery much