Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakan...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to