pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names
2+ messages / 2 participants
[nested] [flat]

* BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names
@ 2018-10-19 03:16 PG Bug reporting form <noreply@postgresql.org>
  2018-10-19 04:35 ` Re: BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2018-10-19 03:16 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: karlcz@isi.edu

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 ...



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names
  2018-10-19 03:16 BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names PG Bug reporting form <noreply@postgresql.org>
@ 2018-10-19 04:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-10-19 04:35 UTC (permalink / raw)
  To: karlcz@isi.edu; +Cc: pgsql-bugs@lists.postgresql.org

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> 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.

Yup, missing quote_identifier calls in pg_get_triggerdef_worker.
Will fix, thanks for the report!

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-10-19 04:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 03:16 BUG #15440: pg_dump does not preserve quoted identifiers for statement-level trigger transition table names PG Bug reporting form <noreply@postgresql.org>
2018-10-19 04:35 ` Tom Lane <tgl@sss.pgh.pa.us>

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