Re: has_table_priviledge - Mailing list pgsql-general

From ahoward
Subject Re: has_table_priviledge
Date
Msg-id Pine.LNX.4.53.0304242225090.9051@eli.fsl.noaa.gov
Whole thread Raw
In response to Re: has_table_priviledge  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: has_table_priviledge  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 24 Apr 2003, Tom Lane wrote:

> ahoward <ahoward@fsl.noaa.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.t.howard@fsl.noaa.gov
  | Phone:  303-497-7238
  | Fax:    303-497-7259
  ====================================


pgsql-general by date:

Previous
From: "Nuno D. Leitao"
Date:
Subject: Connecting from Java to PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: has_table_priviledge