pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Geo P.C. <pcgeopc@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Accessing Extension with out Superuser privilege
Date: Thu, 15 Oct 2015 10:23:26 -0400
Message-ID: <959.1444919006@sss.pgh.pa.us> (raw)
In-Reply-To: <539.1444917734@sss.pgh.pa.us>
References: <CAKtc8vWJnCAuKKur6q0kyg5bnQTBZ5Bt4iPjHu-AnGm8oaikyg@mail.gmail.com>
	<539.1444917734@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

I wrote:
> "Geo P.C." <pcgeopc@gmail.com> writes:
>> In PostgreSQL server we created an extension with this command CREATE
>> EXTENSION "uuid-ossp";

>> For our drupal site with user "drupal_user" we are trying to access this
>> but getting an error as "function uuid_generate_v4() does not exist"
>> When we give privilege for user "drupal_user" as Superuser we are able to
>> access it.

> It sounds like your superuser account has a default search_path that
> includes the schema this function is in, but your drupal_user account
> has a different default search_path that doesn't.  You could put the
> extension in a different schema, or change drupal_user's search_path.

Ah, scratch that (-ENOCAFFEINE).  What seems more likely on re-reading
this is that drupal_user lacks USAGE privilege on whatever schema contains
the uuid-ossp functions.  Depending on which PG version you're using,
I believe that unreadable schemas in your search_path are silently
skipped.  You could confirm that by trying to call the function using
an explicitly schema-qualified function name, and seeing if you get
a permissions error about the schema.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (3+ messages)

Message-ID: <959.1444919006@sss.pgh.pa.us>
Permalink:  ../959.1444919006@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/959.1444919006@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pcgeopc@gmail.com
  Subject: Re: Accessing Extension with out Superuser privilege
  In-Reply-To: <959.1444919006@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox