From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: karlcz@isi.edu
Subject: BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names
Date: Fri, 19 Oct 2018 03:16:52 +0000
Message-ID: <15440-02d1468e94d63d76@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15440
Logged by: Karl Czajkowski
Email address: karlcz@isi.edu
PostgreSQL version: 10.5
Operating system: Linux
Description:
If I create a statement-level trigger using quoted identifiers with the new
transition table feature in pg10 and dump the database with pg_dump, the
dumped CREATE TRIGGER statements lack quotes on the identifier. This
prevents the database from properly round-tripping through dump and restore.
The restored triggers will bind the unquoted identifier as the transition
table names, and my trigger function will encounter errors when it uses an
unknown relation.
Using a simple "sed" filter to rewrite my dump file repairs the dump, since
pg_dump did dump the proper mixed-case spelling of an identifier and only
omitted the wrapping double-quotation marks.
As an example, consider a create trigger clause like: ... REFERENCING OLD
TABLE AS "_myapp_oldtuples_Mixed_Case" ...
It appears in the dumped SQL as: ... REFERENCING OLD TABLE AS
_myapp_oldtuples_Mixed_Case ...
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, karlcz@isi.edu
Subject: Re: BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names
In-Reply-To: <15440-02d1468e94d63d76@postgresql.org>
* 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