Skip site navigation (1) Skip section navigation (2)

CURRENT_USER

From: thiemo <thiemo(at)gmx(dot)ch>
To: pgNovice <pgsql-novice(at)postgresql(dot)org>
Subject: CURRENT_USER
Date: 2002-03-30 02:02:26
Message-ID: 2EED78F6-4382-11D6-9B49-000A27D62F9E@gmx.ch (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

I try to set up a view that selects rows from a table according the 
connected user. However, I issue
CREATE VIEW v_dummy AS
   SELECT
     dummy
     , usr
   FROM t_dummy
   WHERE usr = CURRENT_USER
;
but the following error is returned.
ERROR: Unable to identify an operator '=' for types 'character varying' 
and 'name'. You will have to retype this query using an explicit cast.

So I to_char(CURRENT_USER, *somewhat*) but to no avail.

I'd appreciate any hint. BTW, I use DBVisualizer 2.1 to build my dbs.

Thx

Thiemo

--
Thiemo Kellner
Tösstalstrasse 146
CH-8400 Winterthur

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2002-03-30 04:13:17
Subject: Re: CURRENT_USER
Previous:From: Lewis BergmanDate: 2002-03-29 18:17:57
Subject: INSERT for inherited tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group