Re: Expression matching related question

From: Michael Fuhr <mike(at)fuhr(dot)org>
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 20:42:07
Message-ID: 20060409204207.GA62144@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 10, 2006 at 06:23:01AM +1000, Peter Hoskin wrote:
> 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.

If you're using reserved words like table, column, and left as
identifiers then you'll need to double-quote them. Better yet,
avoid using reserved words as identifiers.

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-09 21:22:59 Re: Expression matching related question
Previous Message Peter Hoskin 2006-04-09 20:39:43 Re: Expression matching related question