| От | Rob Sargent |
|---|---|
| Тема | Re: psql can't subtract |
| Дата | |
| Msg-id | 4D8CC326.8070508@gmail.com обсуждение исходный текст |
| Ответ на | Re: psql can't subtract (Richard Huxton <dev@archonet.com>) |
| Список | pgsql-general |
On 03/25/2011 09:57 AM, Richard Huxton wrote:
> 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.
>
Of course. One lousy malformed input record. The speed at which the
failure occurred lead me to think it was a parsing issue. Turns out the
bogus record was "near the front of the queue".
Thanks
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера