Re: CURRENT_USER - Mailing list pgsql-novice

From Tom Lane
Subject Re: CURRENT_USER
Date
Msg-id 810.1017461597@sss.pgh.pa.us
Whole thread Raw
In response to CURRENT_USER  (thiemo <thiemo@gmx.ch>)
List pgsql-novice
thiemo <thiemo@gmx.ch> writes:
>    WHERE usr =3D CURRENT_USER
> but the following error is returned.
> ERROR: Unable to identify an operator '=3D' for types 'character varying'=
> =20
> and 'name'. You will have to retype this query using an explicit cast.

Hmm... probably there should be an implicit conversion from NAME to TEXT
.. but in the meantime try

   WHERE usr = CURRENT_USER::varchar

            regards, tom lane

pgsql-novice by date:

Previous
From: thiemo
Date:
Subject: CURRENT_USER
Next
From: thiemo
Date:
Subject: Strange insert