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:07:09
Message-ID: Pine.LNX.4.53.0304242201410.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:
> > grib_tables=# select has_table_priviledge('ahoward','btrel','update');
> > ERROR: Function 'has_table_priviledge(unknown, unknown, unknown)' does not exist
>
> Right syntax, wrong function name --- there's no "d" in "privilege".
>
> regards, tom lane

;-)

long day... the error message sure wasn't helpfull though, i finally figured
that one out... any idea why this doesn't work?

create table vtrcs_co_l
(
relname text,
who name default current_user,
time timestamp(0) without time zone default current_timestamp,

primary key (relname),
foreign key (relname)
references btrel (relname),

constraint c0 check
(has_table_privilege(username, relname, 'update'))
);

it creates the table, but an insert of

insert into vtrcs_co_l values('parameter');

fails with

ERROR: text_oid: error in "parameter": can't parse "parameter"

which is very odd since

select has_table_privilege('parameter', current_user, current_timestamp);

does not. incidentally

insert into vtrcs_co_l values('parameter', current_user, current_timestamp);

fails as well with the same error.

thanks.

-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 Dennis Gearon 2003-04-24 22:11:30 Re: C++ and v7.3.2
Previous Message Darren Ferguson 2003-04-24 22:02:33 Re: pl-pgsql question