From b46c92112bf5afb2476d951b9817ebd8daa7b753 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Dec 2012 00:08:23 -0500 Subject: Fix assorted bugs in privileges-for-types patch. Commit 729205571e81b4767efc42ad7beb53663e08d1ff added privileges on data types, but there were a number of oversights. The implementation of default privileges for types missed a few places, and pg_dump was utterly innocent of the whole concept. Per bug #7741 from Nathan Alden, and subsequent wider investigation. --- src/bin/pg_dump/dumputils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bin/pg_dump/dumputils.c') diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 91f2774955c..639ee9e63ad 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -890,6 +890,9 @@ do { \ } else if (strcmp(type, "TABLESPACE") == 0) CONVERT_PRIV('C', "CREATE"); + else if (strcmp(type, "TYPE") == 0 || + strcmp(type, "TYPES") == 0) + CONVERT_PRIV('U', "USAGE"); else if (strcmp(type, "FOREIGN DATA WRAPPER") == 0) CONVERT_PRIV('U', "USAGE"); else if (strcmp(type, "FOREIGN SERVER") == 0) -- cgit v1.2.3