Re: substr - Mailing list pgsql-sql

From Tom Lane
Subject Re: substr
Date
Msg-id 9048.971967012@sss.pgh.pa.us
Whole thread Raw
In response to substr  (Jeff MacDonald <jeff@hub.org>)
Responses Re: substr
List pgsql-sql
Jeff MacDonald <jeff@hub.org> writes:
> i noticed that substr behaves a bit different in pgsql than perl
> ie select foo from table where substr(foo,1,1) = 'X';

> just wondering on the reasoning for this offset ?

Larry Wall and the SQL92 authors didn't talk to each other...

We are implementing SQL around here, not Perl, so we have to follow
the SQL spec's definition of substr().
        regards, tom lane


pgsql-sql by date:

Previous
From: Jeff MacDonald
Date:
Subject: substr
Next
From: Jeff MacDonald
Date:
Subject: Re: substr