From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jack Christensen <jack(at)jackchristensen(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Prepared statements assume text type in PG10 |
Date: | 2017-10-08 00:23:09 |
Message-ID: | 5384.1507422189@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jack Christensen <jack(at)jackchristensen(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Borodin | 2017-10-08 07:52:28 | Re: On markers of changed data |
Previous Message | Peter Geoghegan | 2017-10-07 23:31:27 | Re: Prepared statements assume text type in PG10 |