Re: Expression matching related question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Hoskin <peterh(at)criten(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Expression matching related question
Date: 2006-04-09 21:22:59
Message-ID: 14086.1144617779@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Hoskin <peterh(at)criten(dot)org> writes:
> I wish to do a query such as:
> SELECT * FROM table WHERE column='something' AND column2='something
> else' AND (network='0' OR (left=0 AND network>0));

> However, when I execute this in phppgadmin I'm told there is an error
> around the = character in left=0. Can't seem to figure the syntax.

LEFT is a reserved word, isn't it? If you're going to insist on naming
a column "left", you'll have to double-quote the name every time.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2006-04-09 21:48:33 Re: Debian package for freeradius_postgresql module
Previous Message Michael Fuhr 2006-04-09 20:42:07 Re: Expression matching related question