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:

+ - * / < > = ~ ! @ # % ^ & | ` ?

Grandparent might also want to mark his function as immutable so its execution can be optimized. Aside from that, this works:

CREATE OPERATOR ~~ (LEFTARG=integer, RIGHTARG=text, PROCEDURE=my_like);

However, this only creates it in the current schema. If this really should be usable for everyone, this should be the final statement:

CREATE OPERATOR PUBLIC.~~ (LEFTARG=integer, RIGHTARG=text, PROCEDURE=my_like);

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
stho...@optionshouse.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to 
this email


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

Reply via email to