Re: public schema default ACL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: public schema default ACL
Date
Msg-id 19853.1520433890@sss.pgh.pa.us
Whole thread Raw
In response to Re: public schema default ACL  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: public schema default ACL  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Now, maybe the idea of creating it as soon as a connection is
> established is not great.  What about creating it only when the first
> object creation is attempted and there is no other schema to create in?
> This avoid pointless proliferation of empty user schemas, as well as
> avoid the overhead of checking existence of schem $user on each
> connection.

Hmm.  On first glance that sounds bizarre, but we do something pretty
similar for the pg_temp schemas, so it could likely be made to work.

One issue to think about is exactly which $user we intend to make the
schema for, if we've executed SET SESSION AUTHORIZATION, or are inside
a SECURITY DEFINER function, etc etc.  I'd argue that only the original
connection username should get this treatment, which may mean that object
creation can fail in those contexts.

            regards, tom lane


pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: [HACKERS] Subscription code improvements
Next
From: David Steele
Date:
Subject: Re: Re: [PATCH] GET DIAGNOSTICS FUNCTION_NAME