Re: has_table_priviledge

From: ahoward <ahoward(at)fsl(dot)noaa(dot)gov>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: has_table_priviledge
Date: 2003-04-24 22:35:31
Message-ID: Pine.LNX.4.53.0304242225090.9051@eli.fsl.noaa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 24 Apr 2003, Tom Lane wrote:

> ahoward <ahoward(at)fsl(dot)noaa(dot)gov> writes:
> > insert into vtrcs_co_l values('parameter');
> > fails with
> > ERROR: text_oid: error in "parameter": can't parse "parameter"
>
> Not here. As best I can reproduce your example (it doesn't work as
> given, I'm assuming you meant "who" not "username") I get

yes.

> regression=# insert into vtrcs_co_l values('parameter');
> ERROR: Relation "parameter" does not exist
>
> which is about what I'd expect ...

something still doesn't seem right... this is the simplest possible demo of the problem:

~ > cat advisory_lock.sql
create table advisory_lock
(
relname text,
constraint c check
(has_table_privilege(user, relname, 'update'))
);
insert into advisory_lock values ('pg_class');

~ > psql -f lock.sql
CREATE
psql:lock.sql:7: ERROR: text_oid: error in "pg_class": can't parse "pg_class"

shouldn't this work?

-a

--
====================================
| Ara Howard
| NOAA Forecast Systems Laboratory
| Information and Technology Services
| Data Systems Group
| R/FST 325 Broadway
| Boulder, CO 80305-3328
| Email: ara(dot)t(dot)howard(at)fsl(dot)noaa(dot)gov
| Phone: 303-497-7238
| Fax: 303-497-7259
====================================

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-24 22:39:44 Re: has_table_priviledge
Previous Message Nuno D. Leitao 2003-04-24 22:28:04 Connecting from Java to PostgreSQL