Re: [HACKERS] Prepared statements assume text type in PG10

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Prepared statements assume text type in PG10
Дата
Msg-id 5384.1507422189@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Prepared statements assume text type in PG10  (Jack Christensen <jack@jackchristensen.com>)
Список pgsql-hackers
Jack Christensen <jack@jackchristensen.com> writes:
> Pre-version 10:

> jack=# prepare ps as select $1;
> ERROR:  could not determine data type of parameter $1

> But on PG10 the type defaults to text:

> jack=# prepare ps as select $1;
> PREPARE

> I looked through the git log and couldn't find any commits referencing 
> this. Is this an intended behavior change?

Yes, it is; we no longer allow any SELECT output column to remain
unresolved as unknown type.  If it would have come out like that
before, we force it to text instead.  Peter misidentified the
responsible commit though: it was 1e7c4bb00.  (I guess the commit
log message is a bit misleading, because it only talks about unknown
literals ... but undetermined parameters and undecorated NULL constants
would receive the same force-to-text-type treatment.)
        regards, tom lane


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

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Prepared statements assume text type in PG10
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: [HACKERS] On markers of changed data