From: tushar <tushar.qa@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #5909: Function pg_get_expr throwing error for non superuser
Date: Thu, 3 Mar 2011 07:55:27 GMT
Message-ID: <201103030755.p237tR08010571@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 5909
Logged by: tushar
Email address: tushar.qa@gmail.com
PostgreSQL version: 9.0.2
Operating system: RHEL-5 32 bit
Description: Function pg_get_expr throwing error for non superuser
Details:
Pls refer this below scenario
PG 8.4.4:-
=========
connect to non superuser :-
postgres=# \c - t
psql (8.4.4)
You are now connected to database "postgres" as user "t".
postgres=> select pg_get_expr('a',null);
pg_get_expr
-------------
(1 row)
postgres=>
PG 9.0.2
=========
connect to non superuser :-
postgres=# \c - t
You are now connected to database "postgres" as user "t".
postgres=> select pg_get_expr('a',null);
ERROR: argument to pg_get_expr() must come from system catalogs
postgres=>
Workaround:- if user is superuser then it is working fine..
I found a thread somewhat related to this above issue :-
http://archives.postgresql.org/pgsql-hackers/2010-07/msg00503.php
which look fixed now in PG 9.0.2
e.g:-
postgres=> SELECT pg_get_expr(proargdefaults,
'pg_catalog.pg_class'::regclass)
FROM pg_proc pr
LEFT OUTER JOIN pg_description des ON des.objoid=pr.oid limit 0;
pg_get_expr
-------------
(0 rows)
postgres=>
so i feel this query :-select pg_get_expr('a',null);
should also work in PG 9.0.2 but it is not working. is this an expected
behavior
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tushar.qa@gmail.com
Subject: Re: BUG #5909: Function pg_get_expr throwing error for non superuser
In-Reply-To: <201103030755.p237tR08010571@wwwmaster.postgresql.org>
References: <201103030755.p237tR08010571@wwwmaster.postgresql.org>
* 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