BUG #5560: pg_dump generates invalid DDL - Mailing list pgsql-bugs

From Shigeru Hanada
Subject BUG #5560: pg_dump generates invalid DDL
Date
Msg-id 201007131031.o6DAVofN074768@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5560: pg_dump generates invalid DDL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5560
Logged by:          Shigeru Hanada
Email address:      hanada@metrosystems.co.jp
PostgreSQL version: 9.1devel
Operating system:   Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Description:        pg_dump generates invalid DDL
Details:

When target database contains user mapping for public, pg_dump generates
invalid DDL with empty string like this.

CREATE USER MAPPING FOR "" SERVER srv;

This DDL causes error below.

ERROR:  zero-length delimited identifier at or near """" at character 25
STATEMENT:  CREATE USER MAPPING FOR "" SERVER srv;

How to reproduce:

psql<<EOF
CREATE FOREIGN DATA WRAPPER fdw;
CREATE SERVER srv FOREIGN DATA WRAPPER fdw;
CREATE USER MAPPING FOR PUBLIC SERVER srv;
EOF
pg_dump > mapping.sql
createdb newdb
psql -f mapping.sql newdb

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG #5558: Problema com Bytea (BRASIL)
Next
From: "Christopher Head"
Date:
Subject: BUG #5559: Full SSL verification fails when hostaddr provided