Re: A small bug in gram.y

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: A small bug in gram.y
Дата
Msg-id 4AF0084E020000250002C1AC@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: A small bug in gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A small bug in gram.y
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
>>> LINE 1: SELECT 'aa' NOT SIMILAR TO 123;
>>>                                    ^
>  
>>> LINE 1: SELECT 'aa' SIMILAR TO 123;
>>>                     ^
>  
>>> I think the former error location is better.
>  
>> So do I.
> 
> Uh, why?  It looks like it's complaining about the constant 123,
> not about the operator.
I wrote that before I saw your post, which left me ambivalent.  My
thinking was that it seems clearest to me when it points to the token
at which things become untenable.  At this point there it is still
possible for the statement to be completed with a valid query:
SELECT 'aa' SIMILAR TO 
At this point it is not:
SELECT 'aa' SIMILAR TO 123
If you had something like '123' instead of 123, it would be OK, so I'd
be good with it complaining about the constant 123.
SELECT 'aa' SIMILAR TO '123';?column?
----------f
(1 row)
But if we normally point to the operator when it isn't in the set
allowed with the given operands, then consistency trumps the above.
I yield the point.
-Kevin


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: EOL for 7.4?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: EOL for 7.4?