Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZzmP-001SQB-1t for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 23:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZzmO-008DzV-1T for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 23:34:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZzmO-008DzJ-0O for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 23:34:44 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wZzmM-00000000sai-32w6 for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 23:34:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=/SC+HGyR41iSW20kM9Wlg2TnlTovA7T4s2a9cf80sek=; b=TP69K 07OofwUkV8hkx1F+hvSGwMkw1WPsjBMt+H0PtcrI3HOQhUBWeuFd/mflDF1klEbwd4HANQr0pJWTM yYW1TnjFSuExEFEZbT9RnES4TlsfssYjyfEv+CmVSr6z061GT+vLqvTiKMRb4tFj5XuIQN9bKdD86 F6B3W4GTEmmiftfCOy0dHeI0K/yfC2pvT6GjlBT9tyBztuh7g2/ckTIglXKX/lQZPJyuPfNbdtuND /9oSeed5I1EZJzi9j0Q32RDcnFdEsXEPP7mopPsn1iiEyN5gKHz+qDm7Ge52vubid5LYgxY3QgGpJ kHB07jq1Qc+Z6HA6khsrQOR2BGfaA==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1wZzmL-00000007Y9S-0qVc; Wed, 17 Jun 2026 19:34:41 -0400 Date: Wed, 17 Jun 2026 19:34:41 -0400 From: Bruce Momjian To: Tom Lane Cc: Baji Shaik , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility Message-ID: References: <1131492.1781717349@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="06u5rFDaWFxiMbBd" Content-Disposition: inline In-Reply-To: <1131492.1781717349@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --06u5rFDaWFxiMbBd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 17, 2026 at 01:29:09PM -0400, Tom Lane wrote: > 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. 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. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future. --06u5rFDaWFxiMbBd Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="master.diff" diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml index 285bfa123f6..911a198e676 100644 --- a/doc/src/sgml/release-19.sgml +++ b/doc/src/sgml/release-19.sgml @@ -109,7 +109,14 @@ 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. +Dumps created using pre-PostgreSQL 19 versions of pg_dump +or pg_dumpall, and using standard_conforming_strings = off, +will not properly load into PostgreSQL 19 and later servers. Users should create dumps using PostgreSQL 19 +or later versions of these applications, or use standard_conforming_strings = on. + + + +Client applications still support escape_string_warning = off for compatibility with old servers. The server variable escape_string_warning has been removed as unnecessary. --06u5rFDaWFxiMbBd--