Re: SELECT DISTINCT ON bug? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: SELECT DISTINCT ON bug?
Date
Msg-id 20030522185122.GA16040@wolff.to
Whole thread Raw
In response to Re: SELECT DISTINCT ON bug?  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
On Thu, May 22, 2003 at 12:05:46 -0600,
  "scott.marlowe" <scott.marlowe@ihs.com> wrote:
> On Wed, 21 May 2003, Bruno Wolff III wrote:
>
> > On Wed, May 21, 2003 at 10:58:26 +0100,
> >   "Nigel J. Andrews" <nandrews@investsystems.co.uk> wrote:
> > >
> > > Syntax:
> > > SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
> > >     * | expression [ AS output_name ] [, ...]
> >
> > This syntax expression does seem wrong. Usually concatenation takes
> > precedence over alternation. I think there really should be {}s around
> > the second line.
>
> Good point.  As written, syntax says you can either select * OR you can
> select field1,field2,field3, but you can't select *,oid ...

This is a bit different than what I was looking at, but there still
is a problem. I didn't know you could mix * and other expressions.
I now think the second line should be:
     {* | expression [ AS output_name ]} [, ...]

What I was complaining about was that the first line was only included
on the left side of that alternation. However the above fix takes care
of that problem as well.

pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: PRIMARY KEYS
Next
From: CSN
Date:
Subject: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086