[BUGS] BUG #14853: Parameter type is required even when the query does notneed to know the type

Поиск
Список
Период
Сортировка
От edpeur@gmail.com
Тема [BUGS] BUG #14853: Parameter type is required even when the query does notneed to know the type
Дата
Msg-id 20171013140350.8210.40918@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14853
Logged by:          Eduardo Perez
Email address:      edpeur@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system:   All
Description:

The query:
SELECT ? IS NULL
should work even when the parameter type is unknown, as there is no need to
know the type in that query.

For reference:
http://www.postgresql-archive.org/Regression-Problems-with-Timestamp-arguments-td5770255.html

This patch fixes the issue:
--- postgres/src/backend/tcop/postgres.c
+++ postgres/src/backend/tcop/postgres.c
@@ -1361,20 +1361,6 @@                                        ¶mTypes,
&numParams);
-        /*
-         * Check all parameter types got determined.
-         */
-        for (i = 0; i < numParams; i++)
-        {
-            Oid            ptype = paramTypes[i];
-
-            if (ptype == InvalidOid || ptype == UNKNOWNOID)
-                ereport(ERROR,
-                        (errcode(ERRCODE_INDETERMINATE_DATATYPE),
-                         errmsg("could not determine data type of parameter $%d",
-                                i + 1)));
-        }
-        if (log_parser_stats)            ShowUsage("PARSE ANALYSIS STATISTICS");


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC callsvery much
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: [BUGS] BUG #14851: Systemd kills long-running recovery