Re: Defining my own operator's precedence - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Defining my own operator's precedence
Date
Msg-id 20060305171640.GA7815@svana.org
Whole thread Raw
In response to Defining my own operator's precedence  ("Pierre Racine" <racine_pierre@hotmail.com>)
List pgsql-hackers
On Sun, Mar 05, 2006 at 05:13:11PM +0000, Pierre Racine wrote:
> Hi,
>
> I have develop my own data type and my own operators on this data type. I
> could not find how to tell PostgreSQL which precedence I want to assign to
> my operator. For example, I want my unary operator "~" to have a higher
> precedence than my "+" operator. For now I have to use parenthesis to avoid
> ambiguity. I would prefer being able to define implicit precedence.

Sorry, not possible. :( You pretty much have to choose operators whose
precedence matches what you want.

Have a nice day,

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: "Pierre Racine"
Date:
Subject: Defining my own operator's precedence
Next
From: Tom Lane
Date:
Subject: Re: Copyright