[GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Good afternoon. I've been looking at the Oracle Functionality package. It's very interesting. However, the one place I'm stuck is that while user Postgres can access the functions, no other user seems to have access. I'm sure this is something simple I'm missing, but so far Google hasn't shown me

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound like anything in PostgreSQL I'm familiar with. Is this part of EntepriseDB's Postgres+ package or something? You should probably contact them via

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
It's a contrib module: http://pgfoundry.org/projects/orafce/ Matt On Fri, Mar 4, 2011 at 1:20 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
To be clear, this is open source Postgres I'm using, not the enterprise product. Matt On Fri, Mar 4, 2011 at 1:29 PM, Matt Warner m...@warnertechnology.comwrote: It's a contrib module: http://pgfoundry.org/projects/orafce/ Matt On Fri, Mar 4, 2011 at 1:20 PM, John R Pierce

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
On Mar 5, 2011, at 2:50 AM, John R Pierce wrote: On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound like anything in PostgreSQL I'm familiar with. Is this part of EntepriseDB's Postgres+

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^ HINT: No function matches the given

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Here's how the script is defining the function, if that helps: CREATE FUNCTION nvl(anyelement, anyelement) RETURNS anyelement AS '$libdir/orafunc','ora_nvl' LANGUAGE C IMMUTABLE; On Fri, Mar 4, 2011 at 1:41 PM, Matt Warner m...@warnertechnology.comwrote: No luck: *** as postgres postgres=#

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Bosco Rama
Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:41 PM, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1);

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
On Mar 5, 2011, at 3:11 AM, Matt Warner wrote: postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^ HINT: No function matches the given name and argument types. You might need to

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Andrew Sullivan
On Fri, Mar 04, 2011 at 01:41:34PM -0800, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:48 PM, Bosco Rama postg...@boscorama.com wrote: Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:49 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:41 PM, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR:

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Bosco Rama
Matt Warner wrote: The function cannot be defined in the user's DB because language C is considered a security risk, so only the superuser can do that. Or that's what I get from reading anyway... psql -U postgres -d user_db will allow the superuser to then define the function in the user's

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:51 PM, Andrew Sullivan a...@crankycanuck.ca wrote: On Fri, Mar 04, 2011 at 01:41:34PM -0800, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:56 PM, Bosco Rama postg...@boscorama.com wrote: Matt Warner wrote: The function cannot be defined in the user's DB because language C is considered a security risk, so only the superuser can do that. Or that's what I get from reading anyway... psql -U postgres

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:57 PM, Matt Warner wrote: Not sure. I believe public and pg_catalog are in the path by default. Most of the create function declarations prepend pg_catalog, and I believe I saw somewhere that pg_catalog is the default. But I may be misunderstanding that... CREATE FUNCTION

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 2:03 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:57 PM, Matt Warner wrote: Not sure. I believe public and pg_catalog are in the path by default. Most of the create function declarations prepend pg_catalog, and I believe I saw somewhere that pg_catalog is