Re: A small bug in gram.y

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: A small bug in gram.y
Дата
Msg-id 4AF06353.1030801@enterprisedb.com
обсуждение исходный текст
Ответ на Re: A small bug in gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A small bug in gram.y
Re: A small bug in gram.y
Список pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> BTW, the corresponding error in the "SIMILAR TO ... ESCAPE ..." syntax is:
> 
>> postgres=# SELECT 'aa' SIMILAR TO 123 ESCAPE 'f';
>> ERROR:  function pg_catalog.similar_escape(integer, unknown) does not exist
>> LINE 1: SELECT 'aa' SIMILAR TO 123 ESCAPE 'f';
>>                                    ^
> 
> Well, that's complaining specifically about the ESCAPE part of it.
> This does expose the implementation detail that we try to build the
> similar_escape() call before the overall similar() function call.

Yeah. The "ESCAPE 'f'" part is OK. It's still the 123 that's of the
wrong type. I'd say that message should point to 123 as well. Or to
SIMILAR, if we take your stance that the error is with the SIMILAR TO
operator in general. But pointing to ESCAPE is just weird.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: EOL for 7.4?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A small bug in gram.y