Text cast problem - Mailing list pgsql-sql

From Volkmar Herbst
Subject Text cast problem
Date
Msg-id E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar
Whole thread Raw
Responses Re: Text cast problem
List pgsql-sql

Dear all-

I encountered the following problem:

 

select * from parcel where number = '255 '

gives me 1 row but

 

select * from parcel where number = '255 ' ::text

does give me 0 rows. The cast removes the trailing empty character.

 

Why is that? Unfortunately the statements are generated (NPGSQL) and I can’t change the way they are generated. What can I do? Any suggestions highly welcomed!

 

Volkmar

 

pgsql-sql by date:

Previous
From: "Tena Sakai"
Date:
Subject: Re: [HACKERS] How would I get rid of trailing blank line?
Next
From: Adrian Klaver
Date:
Subject: Re: Text cast problem