Re: [HACKERS] Preserving param location - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Preserving param location
Date
Msg-id 3521849.1626285738@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Preserving param location  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: [HACKERS] Preserving param location  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Tue, Jul 13, 2021 at 07:01:24PM -0400, Tom Lane wrote:
>> So I'm not really convinced that there's a fully-baked use case
>> here, and would like more detail about how you hope to use the
>> location value.

> As I said I have no doubt that there are other cases which are currently not
> correctly handled, but that's not what I'm trying to fix.  I just want to treat
> parameterized queries the same way as regular queries, thus fixing one obvious
> and frequent case (for which some user did complain), hoping that it will on
> its own already help many users.

Hm.  I guess this point (i.e. that the Param substitution should result
in the identical plan tree as writing a literal constant would have)
has some force.  I still feel like your application is pretty shaky,
but I don't really have any ideas about feasible ways to make it better.

Will push the patch.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers
Next
From: Bharath Rupireddy
Date:
Subject: Remove redundant Assert(PgArchPID == 0); in PostmasterStateMachine