Substring result short by 1 - Mailing list pgsql-general

From David Filion
Subject Substring result short by 1
Date
Msg-id 4134D1AF.4010202@filiontech.com
Whole thread Raw
Responses Re: Substring result short by 1
List pgsql-general
Hi,

I have a question about substring(), when I run the following query:

prepaid=# select substring('15148300', 0, 5);
substring
-----------
1514
(1 row)


I get a result with only the first 4 characters, not five.  Why is
that?  The documentation doesn't spend much time discussing the
substring() function and google turned up nothing.  I tried
searching the archives but the site is down.

David





pgsql-general by date:

Previous
From: Jerry LeVan
Date:
Subject: Re: Types and SRF's
Next
From: Ying Lu
Date:
Subject: About "lock file postmaster.pid" Error , cannot setup postmaster