Re: has_table_priviledge - Mailing list pgsql-general

From Tom Lane
Subject Re: has_table_priviledge
Date
Msg-id 3514.1051227534@sss.pgh.pa.us
Whole thread Raw
In response to Re: has_table_priviledge  (ahoward <ahoward@fsl.noaa.gov>)
Responses Re: has_table_priviledge  (ahoward <ahoward@fsl.noaa.gov>)
List pgsql-general
ahoward <ahoward@fsl.noaa.gov> writes:
> On Thu, 24 Apr 2003, Tom Lane wrote:
>> It does work, for me.  What PG version are you using, exactly?

>  PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.96

Ah.  I see it too on 7.2.  It looks like the 7.2 parser is choosing
has_table_privilege(name, oid, text) in preference to
has_table_privilege(name, name, text).  I can get it to work on 7.2 by
putting in an explicit cast, ie, making the constraint read
    constraint c check
      (has_table_privilege(user, relname::name, 'update'))

Probably the reason 7.3 doesn't misbehave is that its function is
declared has_table_privilege(name, text, text).  That affects the
decision because 'text' is a preferred type and 'name' isn't.

            regards, tom lane


pgsql-general by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [NOVICE] ODBC & Access [Try 2]
Next
From: Tom Lane
Date:
Subject: Re: Factoring where clauses through UNIONS take 2