Skip site navigation (1) Skip section navigation (2)

Select syntax (broken in current CVS tree)

From: "Kevin O'Gorman" <kogorman(at)pacbell(dot)net>
To: PGSQL Hackers List <pgsql-hackers(at)hub(dot)org>
Subject: Select syntax (broken in current CVS tree)
Date: 2000-10-27 01:05:05
Message-ID: 39F8D4C1.784D1158@pacbell.net (view raw or flat)
Thread:
Lists: pgsql-hackers
I've been poking into the syntax in gram.y, and finding
that the provision of parentheses for SELECT statements
is pretty broken.  I have previously posted examples of
odd things.  On closer examination, it appears to need
an overhaul.

There are two problems with this: (1) I'm new here, I don't
know the players and the protocols very well.  I don't
want to offend.  And (2) I don't have access to the SQL
standards so that we might get it right.  What I do have
is the Oracle docs, which may or may not have much to do
with how PostgreSQL ought to be, but it's worth noting
that parentheses are not allowed as freely as you might
suppose.

Little fixes here are going to get into trouble with yacc
because the current approach is so awkward.  It turns out
it's the reason Select Statements cannot be listed in a
CREATE RULE like the other kinds of commands.

Given a target syntax (like from the SQL standard) this
can be done in a day or so.  The question is: should it
happen, and if so what is the target syntax?

++ kevin


-- 
Kevin O'Gorman  (805) 650-6274  mailto:kogorman(at)pacbell(dot)net
Permanent e-mail forwarder:  mailto:Kevin.O'Gorman(dot)64(at)Alum(dot)Dartmouth(dot)org
At school: mailto:kogorman(at)cs(dot)ucsb(dot)edu
Web: http://www.cs.ucsb.edu/~kogorman/index.html
Web: http://trixie.kosman.via.ayuda.com/~kevin/index.html

"There is a freedom lying beyond circumstance,
derived from the direct intuition that life can
be grounded upon its absorption in what is
changeless amid change" 
   -- Alfred North Whitehead

Responses

pgsql-hackers by date

Next:From: Stephan SzaboDate: 2000-10-27 01:24:41
Subject: Re: Foreign key references now fails with inherited columns
Previous:From: Tom LaneDate: 2000-10-27 00:59:16
Subject: Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group