Re: Function returns error - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Function returns error
Date
Msg-id 40C88082.2070307@archonet.com
Whole thread Raw
In response to Function returns error  ("Michael Long" <mlong@datalong.com>)
List pgsql-sql
Michael Long wrote:
> ERROR:  operator does not exist: character varying == "unknown"
> HINT:  No operator matches the given name and argument type(s). You may need to add
> explicit type casts.
> CONTEXT:  PL/pgSQL function "building_insert" line 14 at if

Common mistake, still make it myself on occasion. The '==' operator 
doesn't exist in plpgsql, you should use '=' when comparing and ':=' for 
assignment.

HTH
--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Schema + User-Defined Data Type Indexing problems...
Next
From: Franco Bruno Borghesi
Date:
Subject: Re: query optimization