Quoting oddities when defining operators in postgres 8.3

Поиск
Список
Период
Сортировка
От Marc Munro
Тема Quoting oddities when defining operators in postgres 8.3
Дата
Msg-id 1257550129.10631.116.camel@bloodnok.com
обсуждение исходный текст
Ответы Re: Quoting oddities when defining operators in postgres 8.3
Список 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 по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: operator exclusion constraints
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: plperl and inline functions -- first draft