Search Postgresql Archives

Re: psql can't subtract

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/03/11 15:29, Rob Sargent wrote:
Running 9.0.3 (client and server)

select distinct
substring(
...
position( 'xmlns=' in substring(xml_text,1,300)) + length('xmlns="'),
100))) -1
...
gives
ERROR: negative substring length not allowed.

If there is no match the initial position will be zero. Minus one will give you a negative substring length.

--
  Richard Huxton
  Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux