Re: [HACKERS] Prepared statements assume text type in PG10 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Prepared statements assume text type in PG10
Date
Msg-id 5384.1507422189@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Prepared statements assume text type in PG10  (Jack Christensen <jack@jackchristensen.com>)
List 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 by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] Prepared statements assume text type in PG10
Next
From: Andrey Borodin
Date:
Subject: Re: [HACKERS] On markers of changed data