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

From Marc Munro
Subject Quoting oddities when defining operators in postgres 8.3
Date
Msg-id 1257550129.10631.116.camel@bloodnok.com
Whole thread Raw
Responses Re: Quoting oddities when defining operators in postgres 8.3
List pgsql-hackers
This is some oddness about the use of double quotes when defining
operators in postgres 8.3.  

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.

This works:

create operator public.< ( leftarg = public.seg, rightarg = public.seg, procedure = public.seg_lt, commutator =
public.">",negator = public.">=", restrict = pg_catalog.scalarltsel, join = pg_catalog.scalarltjoinsel
 
);

This does not:

create operator public."<" ( leftarg = public.seg, rightarg = public.seg, procedure = public.seg_lt, commutator =
public.">",negator = public.">=", restrict = pg_catalog.scalarltsel, join = pg_catalog.scalarltjoinsel
 
);

Neither does this:

create operator public.< ( leftarg = public.seg, rightarg = public.seg, procedure = public.seg_lt, commutator =
public.>,negator = public.>=, restrict = pg_catalog.scalarltsel, join = pg_catalog.scalarltjoinsel
 
);

But this does:

create operator public.< ( leftarg = public.seg, rightarg = public.seg, procedure = public.seg_lt, commutator = >,
negator= >=, restrict = pg_catalog.scalarltsel, join = pg_catalog.scalarltjoinsel
 
);

This is no big deal and I have no need of a fix but I thought it odd
enough to be worth reporting.

__
Marc


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: operator exclusion constraints
Next
From: Andrew Dunstan
Date:
Subject: Re: plperl and inline functions -- first draft