pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5910: Function pg_get_expr throwing error for non superuser
2+ messages / 2 participants
[nested] [flat]
* BUG #5910: Function pg_get_expr throwing error for non superuser
@ 2011-03-03 08:59 tushar <tushar.qa@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: tushar @ 2011-03-03 08:59 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 5910
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?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #5910: Function pg_get_expr throwing error for non superuser
@ 2011-03-03 11:21 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
parent: tushar <tushar.qa@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2011-03-03 11:21 UTC (permalink / raw)
To: tushar <tushar.qa@gmail.com>; +Cc: pgsql-bugs
On 03.03.2011 10:59, tushar wrote:
> 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)
It was an oversight that we allowed that previously, because the user
can easily crash the backend by passing bogus values. Try 8.4.5 or
later, and you will get the same error that you do on 9.0.2.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-03-03 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 08:59 BUG #5910: Function pg_get_expr throwing error for non superuser tushar <tushar.qa@gmail.com>
2011-03-03 11:21 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
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