Re: BUG #19718: pg_dump -Ft: restore.sql gets "\unrestrict (null)"/"_estrict (null)", so psql skips \i data files - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19718: pg_dump -Ft: restore.sql gets "\unrestrict (null)"/"_estrict (null)", so psql skips \i data files
Date
Msg-id 13363.1790440804@sss.pgh.pa.us
Whole thread
In response to BUG #19718: pg_dump -Ft: restore.sql gets "\unrestrict (null)"/"_estrict (null)", so psql skips \i data files  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Since commit 71ea0d6795 ("Restrict psql meta-commands in plain-text dumps"),
> _reconnectToDB() in src/bin/pg_dump/pg_backup_archiver.c writes

>       ahprintf(AH, "\\unrestrict %s\n", ropt->restrict_key);
>       ...
>       ahprintf(AH, "\\restrict %s\n\n", ropt->restrict_key);

> without checking ropt->restrict_key.

Yeah, that's bad.  It's not surprising that nobody noticed for
tar-format "restore.sql" files, because those are pretty much
write-only; I don't know of any tool that uses them.  I wonder
though if there's any other way to reach this ...

            regards, tom lane



pgsql-bugs by date:

Previous
From: jian he
Date:
Subject: Re: BUG #19621: Unexpected results of JSON_VALUE with DEFAULT ON EMPTY
Next
From: Manu
Date:
Subject: Re: BUG #19621: Unexpected results of JSON_VALUE with DEFAULT ON EMPTY