public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Baji Shaik <[email protected]>
Cc: [email protected]
Cc: Bruce Momjian <[email protected]>
Subject: Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
Date: Wed, 17 Jun 2026 13:29:09 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+fm-RM8bG0G6SJDaMgWkKmtyf4QG=V5We1ViAG0tZ5PU67rLQ@mail.gmail.com>
References: <CA+fm-RM8bG0G6SJDaMgWkKmtyf4QG=V5We1ViAG0tZ5PU67rLQ@mail.gmail.com>

Baji Shaik <[email protected]> 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



Attachments:

  [text/x-diff] v2-document-dump-restore-hazard.patch (1.1K, ../[email protected]/2-v2-document-dump-restore-hazard.patch)
  download | inline diff:
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 <link linkend="guc-standard-conforming-strings"><varname>standard_conformi
 </para>
 
 <para>
-Server variable <varname>escape_string_warning</varname> has been removed as unnecessary.  Client applications still support <literal>escape_string_warning = off</literal> for compatibility with old servers.
+This carries some risk for upgrades: a dump file produced by
+pre-v19 <application>pg_dump</application> from a server that
+had <literal>standard_conforming_strings = off</literal>
+will not restore correctly into v19 or later.  Use
+v19 <application>pg_dump</application> to take the dump, or
+set <literal>standard_conforming_strings = on</literal>
+in the old server before dumping.
+Client applications still support operations with servers
+having <literal>standard_conforming_strings = off</literal>, for
+compatibility with old servers.
+Server variable <varname>escape_string_warning</varname> has been removed
+as unnecessary.
 </para>
 </listitem>
 


view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox