Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Baji Shaik writes: > Commit 45762084 [1] forced standard_conforming_strings to always be ON in > PostgreSQL 19. The release notes mention this change, but neither the > pg_dump/pg_restore reference pages nor the migration section note the > implications for restoring older dump files. Okay, that's an oversight in the release notes for sure. I'm more skeptical about putting such information into the application reference pages though. It seems of only transient interest, but any text we put there is likely to survive for many years. Independently of that... > The attached patch adds notes to: > - pg_dump reference page (Notes section) > - pg_restore reference page (Notes section) > - release-19 migration section I don't like this patch, because it presents much too rosy a view of whether you can get away with not re-taking the dump. It's unsafe even with COPY-format data, because string literals in views, table default expressions and constraints, function definitions, etc are all at hazard of being misinterpreted. I think we should just say it won't work correctly, full stop. I'm inclined to do more or less the attached, which also fixes what seems a thinko in the existing text: we should say that clients still support standard_conforming_strings = off, not escape_string_warning = off. regards, tom lane diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml index 285bfa123f6..4943885cf01 100644 --- a/doc/src/sgml/release-19.sgml +++ b/doc/src/sgml/release-19.sgml @@ -109,7 +109,18 @@ Force standard_conformi -Server variable escape_string_warning has been removed as unnecessary. Client applications still support escape_string_warning = off for compatibility with old servers. +This carries some risk for upgrades: a dump file produced by +pre-v19 pg_dump from a server that +had standard_conforming_strings = off +will not restore correctly into v19 or later. Use +v19 pg_dump to take the dump, or +set standard_conforming_strings = on +in the old server before dumping. +Client applications still support operations with servers +having standard_conforming_strings = off, for +compatibility with old servers. +Server variable escape_string_warning has been removed +as unnecessary.
Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
От:
Baji Shaik <baji.pgdev@gmail.com>
Дата:
On Wed, Jun 17, 2026 at 12:29 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
I'm inclined to do more or less the attached, which also fixes what
seems a thinko in the existing text: we should say that clients still
support standard_conforming_strings = off, not
escape_string_warning = off.
I was only thinking about the data rows. Your v2 looks good to me.
Thanks,
Baji Shaik.
Thanks,
Baji Shaik.
Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian writes: > On Wed, Jun 17, 2026 at 01:29:09PM -0400, Tom Lane wrote: >> I'm inclined to do more or less the attached, which also fixes what >> seems a thinko in the existing text: we should say that clients still >> support standard_conforming_strings = off, not >> escape_string_warning = off. > I have applied a slightly modified version to master, attached. The git > commit suggested this problem, but I didn't understand the impact at the > time I read it. This didn't correct the point I complained of above: it still says Client applications still support escape_string_warning = off for compatibility with old servers. The notion of a client "supporting" escape_string_warning seems quite meaningless. I think this intended to say standard_conforming_strings = off. regards, tom lane
Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
On Thu, Jun 18, 2026 at 11:34:46AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Wed, Jun 17, 2026 at 01:29:09PM -0400, Tom Lane wrote: > >> I'm inclined to do more or less the attached, which also fixes what > >> seems a thinko in the existing text: we should say that clients still > >> support standard_conforming_strings = off, not > >> escape_string_warning = off. > > > I have applied a slightly modified version to master, attached. The git > > commit suggested this problem, but I didn't understand the impact at the > > time I read it. > > This didn't correct the point I complained of above: it still says > > Client applications still support escape_string_warning = off for compatibility with old servers. > > The notion of a client "supporting" escape_string_warning seems quite > meaningless. I think this intended to say standard_conforming_strings = > off. Ah, yes, I see my mistake now. Attached patch applied using your wording. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.