Re: Expression matching related question - Mailing list pgsql-general

From Tom Lane
Subject Re: Expression matching related question
Date
Msg-id 14086.1144617779@sss.pgh.pa.us
Whole thread Raw
In response to Expression matching related question  (Peter Hoskin <peterh@criten.org>)
List pgsql-general
Peter Hoskin <peterh@criten.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

pgsql-general by date:

Previous
From: "Daniel McBrearty"
Date:
Subject: advice on schema for multilingual text
Next
From: Chris Travers
Date:
Subject: Re: Debian package for freeradius_postgresql module