| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| 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-07 23:27:51 |
| Message-ID: | CAH2-Wz=QZr4cpw1VzaiUa2yovLMBkwaEf-Kj-RduZHdosndKWw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Oct 7, 2017 at 2:56 PM, Jack Christensen
<jack(at)jackchristensen(dot)com> wrote:
> The test suite for the Go PostgreSQL driver pgx
> (https://github.com/jackc/pgx) found an unexpected behavior change in PG10.
> Previously, it was impossible to prepare a statement with a unknown or
> ambiguous parameter type.
>
> 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
> Time: 0.183 ms
> jack=# execute ps('Hello, there');
> ?column?
> --------------
> Hello, there
> (1 row)
>
> Time: 0.437 ms
>
> I looked through the git log and couldn't find any commits referencing this.
> Is this an intended behavior change?
I suspect commit d8d32d9 is involved here, though I haven't verified that.
--
Peter Geoghegan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2017-10-07 23:31:27 | Re: Prepared statements assume text type in PG10 |
| Previous Message | Alvaro Herrera | 2017-10-07 23:25:24 | Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple |