Re: Support prepared statement invalidation when result types change

From: Jelte Fennema <me(at)jeltef(dot)nl>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support prepared statement invalidation when result types change
Date: 2023-08-28 16:51:02
Message-ID: CAGECzQQnm2Tdq9_EJRDL-HVEGcbEmpqADxXJ=p5zVXheu1=8-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 28 Aug 2023 at 11:27, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> With parameters, it also works, only a tiny issue with error reporting.
>
> prepstmt2 | PREPARE prepstmt2(bigint) AS SELECT * FROM pcachetest
> WHERE q1 = $1; | {bigint} | {bigint,bigint,bigint}
> ERROR: column "q1" does not exist at character 61
> HINT: Perhaps you meant to reference the column "pcachetest.x1".
> STATEMENT: execute prepstmt2(1);
>
> I think "character 61" refer to "PREPARE prepstmt2(bigint) AS SELECT *
> FROM pcachetest WHERE q1 = $1;"
> so maybe the STATEMENT is slightly misleading.

Could you share the full set of commands that cause the reporting
issue? I don't think my changes should impact this reporting, so I'm
curious if this is a new issue, or an already existing one.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Shinderuk 2023-08-28 17:39:07 Re: Fix error handling in be_tls_open_server()
Previous Message Peter Geoghegan 2023-08-28 16:48:13 Re: Eager page freeze criteria clarification