Re: operator precedence (was: How to use like with a list)

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: operator precedence (was: How to use like with a list)
Date: 2011-11-18 20:59:32
Message-ID: 4EC6C734.9070407@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/18/11 12:47 PM, John R Pierce wrote:
> does ~ have higher expression priority than || or something?

speaking of...

the precedence table [1] seems somewhat short of operators... the regex
operators like ~ ~* etc aren't on there, nor is string concatenation ||
... I'd expect the regex pattern ops like ~ should be with the LIKE
etc pattern matching, but apparently they are lumped in with 'everything
else' resulting in the anomalous behavior noted in the referenced thread...

[1]
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-PRECEDENCE

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2011-11-18 21:14:28 Re: CLONE DATABASE (with copy on write?)
Previous Message David Johnston 2011-11-18 20:58:52 Re: How to use like with a list