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

Re: CURRENT_USER

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: thiemo <thiemo(at)gmx(dot)ch>
Cc: pgNovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: CURRENT_USER
Date: 2002-03-30 04:13:17
Message-ID: 810.1017461597@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
thiemo <thiemo(at)gmx(dot)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

In response to

pgsql-novice by date

Next:From: thiemoDate: 2002-03-30 09:19:08
Subject: Strange insert
Previous:From: thiemoDate: 2002-03-30 02:02:26
Subject: CURRENT_USER

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