Re: BUG #17842: Adding a qual to a working query gets bogus syntax error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17842: Adding a qual to a working query gets bogus syntax error
Дата
Msg-id 2692255.1678810846@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17842: Adding a qual to a working query gets bogus syntax error  (PG Bug reporting form <noreply@postgresql.org>)
Ответы AW: BUG #17842: Adding a qual to a working query gets bogus syntax error  (Hans Buschmann <buschmann@nidsa.net>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> During refactoring our application I got a bogus syntax error when adding a
> simple where-clause to a working query.

My guess is that this:

> ('0'||split_part(split_part(nline,'(',2),')',1))::smallint as nlen

sometimes produces a string that fails to cast to smallint, which you
accidentally don't notice because it never gets evaluated for troublesome
values of nline --- until you add the "nlen > 0" condition.  There isn't
anything in your query that prevents that from being evaluated fairly
early.

This isn't a bug, or at least you have provided no data that would
motivate (or indeed allow) anyone else to poke into it more closely.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17842: Adding a qual to a working query gets bogus syntax error
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17843: Writing uninitialised data in logtape/buffile