Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Substring result short by 1


  • From: David Filion <david(at)filiontech(dot)com>
  • To: pgsql-general <pgsql-general(at)postgresql(dot)org>
  • Subject: Substring result short by 1
  • Date: Tue, 31 Aug 2004 15:29:51 -0400
  • Message-id: <4134D1AF.4010202@filiontech.com> <text/plain>

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







Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group