Skip site navigation (1) Skip section navigation (2)

General Bug Report: pg_dump sets quotes wrong when dumping groups-acls.

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: pg_dump sets quotes wrong when dumping groups-acls.
Date: 1999-05-03 11:18:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
                        POSTGRESQL BUG REPORT TEMPLATE

Your name               : Bernhard Weisshuhn
Your email address      : bkw(at)weisshuhn(dot)de

Category                : runtime: front-end
Severity                : serious

Summary: pg_dump sets quotes wrong when dumping groups-acls.

System Configuration
  Operating System   : Linux 2.0.36 ELF

  PostgreSQL version : 6.4.2

  Compiler used      : gcc

Redhat 5.2, custom-built postgresql (no RPM)

Versions of other tools:


Problem Description:
When executing
% pg_dump -z somedatabase
and a database contains acl-permissions like
=> "GRANT ALL on sometable to group somegroup"
pg_dump incorrectly generates the line:
  GRANT ALL on "sometable" to "group somegroup";
instead of
  GRANT ALL on "sometable" to group "bosses";

The incorrect output generates errors when restoring
databases from the dump and fails to set the correct


Test Case:
createdb grouptestdb;
psql grouptestdb -c "insert into pg_group (groname,grosysid,grolist) VALUES ('testgroup',1000,'{500}');"
psql grouptestdb -c "create table dummy (foobar int4);"
psql grouptestdb -c "grant ALL on dummy to group testgroup;"
pg_dump -z -s -t dummy grouptestdb


Obviously, pg_dump does not seem to know about groups at all,
so it treats "group testgroup" as a user.
Sorry, this one is too hard for me to fix the right way, 
maybe we could just check, if the userstring begins with 
'group ' and alter the quotes accordingly, but this does
not look like a clean solution to me.



pgsql-bugs by date

Next:From: Unprivileged userDate: 1999-05-03 11:20:56
Subject: General Bug Report: Correction: pg_dump sets quotes wrong when dumping groups-acls.
Previous:From: Bruce MomjianDate: 1999-05-02 17:09:52
Subject: Re: [BUGS] Alter Table Bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group