pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Jeff Davis <jdavis@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix pg_dump assertion failure when dumping pg_catalog.
Date: Mon, 04 Sep 2023 09:56:04 -0400
Message-ID: <1149326.1693835764@sss.pgh.pa.us> (raw)
In-Reply-To: <2a31d8ba-38e9-6335-8ba6-9d042c63473b@eisentraut.org>
References: <E1qYXfk-000MI1-Ql@gemulon.postgresql.org>
	<2a31d8ba-38e9-6335-8ba6-9d042c63473b@eisentraut.org>

Peter Eisentraut <peter@eisentraut.org> writes:
> I have another question about this patch.  The original issue was that 
> it would trigger an Assert() inside pg_dump when some columns in 
> pg_collation were null that were not expected.  This patch now contains 
> code like

>              appendPQExpBufferStr(q, ", lc_collate = ");
> -           appendStringLiteralAH(q, collcollate, fout);
> +           appendStringLiteralAH(q, collcollate ? collcollate : "", fout);
>              appendPQExpBufferStr(q, ", lc_ctype = ");
> -           appendStringLiteralAH(q, collctype, fout);
> +           appendStringLiteralAH(q, collctype ? collctype : "", fout);

> which would produce pg_dump output like

> CREATE COLLATION ... (provider = libc, lc_collate = , lc_ctype = );

> which is not valid syntax.

How so?  appendStringLiteral adds quotes around what it's given,
empty string or no.

The receiving server might or might not like those parameters
semantically, but the syntax should be ok.

			regards, tom lane





view thread (6+ messages)

Message-ID: <1149326.1693835764@sss.pgh.pa.us>
Permalink:  ../1149326.1693835764@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1149326.1693835764@sss.pgh.pa.us

 · 

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: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter@eisentraut.org, jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix pg_dump assertion failure when dumping pg_catalog.
  In-Reply-To: <1149326.1693835764@sss.pgh.pa.us>

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

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