Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EC22A1337B43 for ; Thu, 3 Mar 2011 07:26:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 35562-08 for ; Thu, 3 Mar 2011 11:26:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) by mail.postgresql.org (Postfix) with ESMTP id 050C0133655C for ; Thu, 3 Mar 2011 07:26:20 -0400 (AST) Received: from source ([209.85.215.41]) (using TLSv1) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKTW963AkGyZAnOcLDI9+5iL4k65Dp0Fhl@postini.com; Thu, 03 Mar 2011 03:26:21 PST Received: by ewy10 with SMTP id 10so409874ewy.14 for ; Thu, 03 Mar 2011 03:26:19 -0800 (PST) Received: by 10.213.32.204 with SMTP id e12mr1002699ebd.30.1299151267148; Thu, 03 Mar 2011 03:21:07 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id b52sm866230eei.1.2011.03.03.03.21.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2011 03:21:06 -0800 (PST) Message-ID: <4D6F799F.7050909@enterprisedb.com> Date: Thu, 03 Mar 2011 13:21:03 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: tushar CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5910: Function pg_get_expr throwing error for non superuser References: <201103030859.p238xNGA043782@wwwmaster.postgresql.org> In-Reply-To: <201103030859.p238xNGA043782@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201103/20 X-Sequence-Number: 29530 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