Re: operator precedence issues

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: operator precedence issues
Date: 2013-08-30 22:48:52
Message-ID: 20130830224852.GA11360@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2013-08-30 17:35:04 -0500, Merlin Moncure wrote:
> "When a schema-qualified operator name is used in the OPERATOR syntax,
> as for example in:
> SELECT 3 OPERATOR(pg_catalog.+) 4;
> the OPERATOR construct is taken to have the default precedence shown
> in Table 4-2 for "any other" operator. This is true no matter which
> specific operator appears inside OPERATOR()."
>
> That rule seems intentionally designed to make it impossible to to
> override mathematical behaviors. Mainly curious -- was that
> intentional?

You can change your search_path to include your schema before an
explicitly listed pg_catalog afair. Not nice, but should work...

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-08-30 23:56:26 Re: Variadic aggregates vs. project policy
Previous Message Tom Lane 2013-08-30 22:46:32 Re: operator precedence issues