CREATE FUNCTION complex_add(complex, complex)
RETURNS complex
AS 'filename', 'complex_add'
- LANGUAGE C;
+ LANGUAGE C IMMUTABLE STRICT;
CREATE OPERATOR + (
leftarg = complex,
- The left operand type of a commuted operator is the same as the
+ The left operand type of a commutable operator is the same as the
right operand type of its commutator, and vice versa. So the name of
the commutator operator is all that
PostgreSQL
needs to be given to look up the commutator, and that's all that needs to
tab2.y = tab1.x>, because the indexscan machinery expects
to see the indexed column on the left of the operator it is given.
PostgreSQL will
not> simply
- assume that this is a valid transformation --- the definer of the
+ assume that this is a valid transformation --- the creator of the
=> operator must specify that it is valid, by marking the
operator with commutator information.