BUG #5560: pg_dump generates invalid DDL

From: "Shigeru Hanada" <hanada(at)metrosystems(dot)co(dot)jp>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5560: pg_dump generates invalid DDL
Date: 2010-07-13 10:31:50
Message-ID: 201007131031.o6DAVofN074768@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5560
Logged by: Shigeru Hanada
Email address: hanada(at)metrosystems(dot)co(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Satish Kumar 2010-07-13 11:10:51 BUG #5561: Tsearch across schemas
Previous Message Peter Eisentraut 2010-07-13 09:59:45 Re: BUG #5558: Problema com Bytea (BRASIL)