Re: Stripping white-space in SELECT statments - Mailing list pgsql-sql

From Mathieu Arnold
Subject Re: Stripping white-space in SELECT statments
Date
Msg-id 543384405.1032453683@andromede.reaumur.absolight.net
Whole thread Raw
In response to Stripping white-space in SELECT statments  (Thorbjörn Eriksson <thorbjorn.eriksson@ec.se>)
List pgsql-sql

--On jeudi 19 septembre 2002 13:20 +0200 Thorbjörn Eriksson
<thorbjorn.eriksson@ec.se> wrote:

> Hello,
>
> I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> handles strings ending with space characters.
>
> If I want to search for records where the first column (artnrgrpmtrln_1)
> begins with
> '201901  ', our system that uses the database creates the following SQL
> statement:
>
> select artnrgrpmtrln_1 from sr where (artnrgrpmtrln_1>='201901  ' and
> artnrgrpmtrln_1<='201901  ÿ'

and why not
select artnrgrpmtrln_1
from sr
where substr(artnrgrpmtrln_1, 0, 9) = '201901  '


--
Mathieu Arnold


pgsql-sql by date:

Previous
From: Charles Hauser
Date:
Subject: help w/ constructing a SELECT
Next
From: PostgreSQL Server
Date:
Subject: Table Copy.