CURRENT_USER - Mailing list pgsql-novice

From thiemo
Subject CURRENT_USER
Date
Msg-id 2EED78F6-4382-11D6-9B49-000A27D62F9E@gmx.ch
Whole thread Raw
Responses Re: CURRENT_USER
List 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

<fontfamily><param>Helvetica</param>

--

Thiemo Kellner

Tösstalstrasse 146

CH-8400 Winterthur

</fontfamily>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

pgsql-novice by date:

Previous
From: denis@coralindia.com
Date:
Subject: Re: Export query result to text file?
Next
From: Tom Lane
Date:
Subject: Re: CURRENT_USER