pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Volkmar Herbst <herbst@gc-i.de>
To: pgsql-sql@postgresql.org
Subject: Text cast problem
Date: Thu, 2 Apr 2009 09:51:30 -0000
Message-ID: <E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar> (raw)

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

 

view thread (2+ messages)  latest in thread

Message-ID: <E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar>
Permalink:  ../E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar/
Also on:    postgresql.org/message-id/E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: herbst@gc-i.de
  Subject: Re: Text cast problem
  In-Reply-To: <E5F311726E664432BEB109D30F3D3C26@NotebookVolkmar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox