Re: Do quoting more carefully in replication commands

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-06-12T21:24:05Z
Lists: pgsql-hackers
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
> In a quick skim, I wondered about this bit:

>> + * Caution: this quoting logic is sufficient for identifiers and literals
>> + * in the replication grammar, but not always in regular SQL.  Specifically,
>> + * it'd fail for a string literal if standard_conforming_strings is off.

> ... given that standard_conforming_strings can no longer be off in 19.
> The backpatched version should surely still have this, just in case, but
> in 19 it's probably not needed.

There are assorted places in the backend that want to generate SQL
that will work against older versions.  I don't think we can forget
about standard_conforming_strings until all those versions are off
even the support-back-to list, ie about 10 years from now.

			regards, tom lane



Commits

  1. Clean up quoting of variable strings within replication commands.