On 10/30/2012 03:14 PM, David Johnston wrote:
"LIKE" is apparently not an operator but a special SQL construct.
Almost. :) The real problem is this, from the manual:
"The operator name is a sequence of up to NAMEDATALEN-1 (63 by default)
characters from the following list:
+ - * / < > = ~
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Thalis Kalfigkopoulos
> Sent: Tuesday, October 30, 2012 3:55 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] overloading LIKE operator
Hi all,
I'd like to be able to operate LIKE using as arguments an integer and
a text value.
In postgresql 9.0 the following raises an error:
# SELECT 123 LIKE '123';
ERROR: operator does not exist: integer ~~ unknown
LINE 1: select 123 like '123'; ^
HINT: No operator matches t