Re: Ocasional problems !!!! - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Ocasional problems !!!!
Date
Msg-id 3A38F1FD.493C0314@alumni.caltech.edu
Whole thread Raw
In response to Ocasional problems !!!!  (Luis Sousa <llsousa@ualg.pt>)
List pgsql-hackers
> i'm having this message:
> ERROR:  Unable to identify an operator '=' for types 'int4' and 'text'
>         You will have to retype this query using an explicit cast

Without knowing your schema and query, we can't tell you exactly. But
your query is trying to compare a string to an integer, which you can do
by using an explicit cast. For example,
 select text '123' = 123;

will fail, but
 select cast((text '123') as integer) = 123;

will succeed.
                   - Thomas


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: fs full stops postmaster
Next
From: "Michael Richards"
Date:
Subject: Re: (Updated) Table File Format