Commit 8cb041aa authored by Peter Eisentraut's avatar Peter Eisentraut

Set up the privileges on the default schemas in initdb with real GRANT

commands, to arrive at a valid and dumpable state.
parent 28efaf3c
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.184 2003/02/19 23:41:15 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.185 2003/03/19 16:08:59 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -1035,6 +1035,8 @@ $ECHO_N "setting privileges on built-in objects... "$ECHO_C ...@@ -1035,6 +1035,8 @@ $ECHO_N "setting privileges on built-in objects... "$ECHO_C
WHERE proacl IS NULL; WHERE proacl IS NULL;
UPDATE pg_language SET lanacl = '{"=U/$POSTGRES_SUPERUSERNAME"}' \ UPDATE pg_language SET lanacl = '{"=U/$POSTGRES_SUPERUSERNAME"}' \
WHERE lanpltrusted; WHERE lanpltrusted;
GRANT USAGE ON SCHEMA pg_catalog TO PUBLIC;
GRANT CREATE, USAGE ON SCHEMA public TO PUBLIC;
EOF EOF
) \ ) \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_namespace.h,v 1.8 2002/09/04 20:31:37 momjian Exp $ * $Id: pg_namespace.h,v 1.9 2003/03/19 16:08:59 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -66,14 +66,14 @@ typedef FormData_pg_namespace *Form_pg_namespace; ...@@ -66,14 +66,14 @@ typedef FormData_pg_namespace *Form_pg_namespace;
* --------------- * ---------------
*/ */
DATA(insert OID = 11 ( "pg_catalog" PGUID "{=U}" )); DATA(insert OID = 11 ( "pg_catalog" PGUID _null_ ));
DESCR("System catalog namespace"); DESCR("System catalog schema");
#define PG_CATALOG_NAMESPACE 11 #define PG_CATALOG_NAMESPACE 11
DATA(insert OID = 99 ( "pg_toast" PGUID "{=}" )); DATA(insert OID = 99 ( "pg_toast" PGUID _null_ ));
DESCR("Reserved namespace for TOAST tables"); DESCR("Reserved schema for TOAST tables");
#define PG_TOAST_NAMESPACE 99 #define PG_TOAST_NAMESPACE 99
DATA(insert OID = 2200 ( "public" PGUID "{=UC}" )); DATA(insert OID = 2200 ( "public" PGUID _null_ ));
DESCR("Standard public namespace"); DESCR("Standard public schema");
#define PG_PUBLIC_NAMESPACE 2200 #define PG_PUBLIC_NAMESPACE 2200
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment