bug in substring???

Поиск
Список
Период
Сортировка
Искать
От
scott.marlowe
Тема
bug in substring???
Дата
Msg-id
Pine.LNX.4.33.0402061419460.6661-100000@css120.ihs.com
Список
Дерево обсуждения
bug in substring??? "scott.marlowe" <scott.marlowe@ihs.com>
Re: bug in substring??? Joe Conway <mail@joeconway.com>
Re: bug in substring??? "scott.marlowe" <scott.marlowe@ihs.com>
Re: bug in substring??? Tom Lane <tgl@sss.pgh.pa.us>
I'm using substring.  Since I'm a coder more than a database guy, I 
expected this:

select substring('abcdefgh',0,4);

would give me 

abcd

but it gives me a left aligned 'abc'

select substring('abcdefgh',1,4);

works fine.

select substring('abcdefgh',-4,4);

gives me nothing.  Shouldn't a negative offset, or even 0 offset result in 
an error or something here?  Or is there a special meaning to a negative 
offset I'm not getting?

Just wondering.  




В списке pgsql-hackers по дате отправления
От: markw@osdl.org
Дата:
От: Robert Treat
Дата:
FAQ