mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-12 04:16:50 +02:00
04a4821ade
to note: 1) arttype is numeric. I thought this was the best way of allowing arbitarily large factorials, even though factorial(2^63) is a large number. Happy to change to integers if this is overkill. 2) since we're accepting numeric arguments, the patch tests for floats. If a numeric is passed with non-zero decimal portion, an error is raised since (from memory) they are undefined. Gavin Sherry
39 lines
623 B
SQL
39 lines
623 B
SQL
--
|
|
-- CREATE_OPERATOR
|
|
--
|
|
|
|
CREATE OPERATOR ## (
|
|
leftarg = path,
|
|
rightarg = path,
|
|
procedure = path_inter,
|
|
commutator = ##
|
|
);
|
|
|
|
CREATE OPERATOR <% (
|
|
leftarg = point,
|
|
rightarg = widget,
|
|
procedure = pt_in_widget,
|
|
commutator = >% ,
|
|
negator = >=%
|
|
);
|
|
|
|
CREATE OPERATOR @#@ (
|
|
rightarg = int8, -- left unary
|
|
procedure = numeric_fac
|
|
);
|
|
|
|
CREATE OPERATOR #@# (
|
|
leftarg = int8, -- right unary
|
|
procedure = numeric_fac
|
|
);
|
|
|
|
CREATE OPERATOR #%# (
|
|
leftarg = int8, -- right unary
|
|
procedure = numeric_fac
|
|
);
|
|
|
|
-- Test comments
|
|
COMMENT ON OPERATOR ###### (int4, NONE) IS 'bad right unary';
|
|
|
|
|