Re: Quoting oddities when defining operators in postgres 8.3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Quoting oddities when defining operators in postgres 8.3
Date
Msg-id 11970.1257556475@sss.pgh.pa.us
Whole thread Raw
In response to Quoting oddities when defining operators in postgres 8.3  (Marc Munro <marc@bloodnok.com>)
List pgsql-hackers
Marc Munro <marc@bloodnok.com> writes:
> It seems that the operator name in the create operator clause cannot be
> quoted, but in the commutator, or negator clauses, if schema-qualified,
> the operator must be quoted.  If not schema-qualified it seems there is
> no need for quoting.

The correct way to write a schema-qualified operator name isOPERATOR(foo.<)
You can get away without the OPERATOR() decoration immediately after
CREATE OPERATOR, since it's known that an operator name must appear
there, but within the definition-item list the parser is stickier
about this.  It's more or less an implementation artifact that
foo."<" works at all, because that's not an operator name, it's
a regular identifier.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Specific names for plpgsql variable-resolution control options?
Next
From: Tom Lane
Date:
Subject: Re: plperl and inline functions -- first draft