Created
January 20, 2010 07:01
-
-
Save iakio/281672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ishida=# create function any_eq (anyelement, anyelement) returns boolean language sql as 'select $1 = $2'; | |
CREATE FUNCTION | |
ishida=# create operator == (procedure = any_eq, leftarg=anyelement, rightarg=anyelement); | |
CREATE OPERATOR | |
ishida=# select 1+2 == 3; | |
?column? | |
---------- | |
t | |
(1 row) | |
ishida=# select 'abc' == 'abc'; | |
ERROR: could not determine polymorphic type because input has type "unknown" | |
ishida=# select 'abc' == 'abc'::text; | |
?column? | |
---------- | |
t | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment