Re: Record SET session in VariableSetStmt

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Record SET session in VariableSetStmt
Date: 2022-10-06 11:18:12
Message-ID: 20221006111812.xogzmp3wzmstvuav@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Oct 06, 2022 at 12:57:17PM +0200, Drouvot, Bertrand wrote:
> Hi hackers,
>
> "SET local" is currently recorded in VariableSetStmt (with the boolean
> is_local) but "SET session" is not.
>
> Please find attached a patch proposal to also record "SET session" so that
> VariableSetStmt records all the cases.
>
> Remark: Recording "SET session" will also help for the Jumbling work being
> done in [1].

I don't think it's necessary. SET and SET SESSION are semantically the same so
nothing should rely on how exactly someone spelled it. This is also the case
for our core jumbling code, where we guarantee (or at least try to) that two
semantically identical statements will get the same queryid, and therefore
don't distinguish eg. LIKE vs ~~.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-10-06 11:26:55 Re: fix comment typo in xlogprefetcher.c
Previous Message Drouvot, Bertrand 2022-10-06 10:57:17 Record SET session in VariableSetStmt