Re: Zero-length character breaking query? - Mailing list pgsql-general

From Bosco Rama
Subject Re: Zero-length character breaking query?
Date
Msg-id 4F638FD8.6070206@boscorama.com
Whole thread Raw
In response to Zero-length character breaking query?  (Doug Gorley <dgorley@aihs.ca>)
List pgsql-general
Doug Gorley wrote:
>
> "select * from tdt_unsent where str_name_l = 'SMITH'" returns 0 rows.
> "select * from tdt_unsent where str_name_l ~ '^SMITH'" returns 3 rows.
> "select * from tdt_unsent where str_name_l ~ '^SMITH$'" returns 0 rows.
> "select length(str_name_l) from tdt_unsent where str_name_l ~ '^SMITH'" returns "5".

what does the following return?
  select str_name_l::bytea from tdt_unsent where str_name_l ~ '^SMITH';

It should show you any chars that don't usually display in your locale as
hex chars (i.e. \xNN).

Bosco.

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: Authenticating from a web service call
Next
From: Aleksey Tsalolikhin
Date:
Subject: Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?