Re: Problemas with gram.y - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Problemas with gram.y
Date
Msg-id 20060304102941.GC29180@svana.org
Whole thread Raw
In response to Re: Problemas with gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problemas with gram.y
List pgsql-hackers
On Sat, Mar 04, 2006 at 01:16:55AM -0500, Tom Lane wrote:
> What's bugging me about it is that the proposed syntax wedges a bunch
> of index-access-method-specific parameters into what ought to be an
> access-method-agnostic syntax; and furthermore does it by adding more
> grammar keywords, something we have far too many of already.  There are
> direct measurable costs to having more keywords, and the approach does
> not scale up to allowing other index AMs to have other parameters that
> might not bear at all on btree.

I think the current method is based on compatability with other
databases. However, a more generic approach would be to (re)use the
"definition" or "def_list" productions. This would allow any of the
following (examples):

CREATE INDEX foo ON bar (x) WITH (fillfactor = 70, option = blah);
CREATE INDEX foo ON bar (x) WITH fillfactor = 70, option = blah;
CREATE INDEX foo ON bar (x) (fillfactor = 70, option = blah);
CREATE INDEX foo ON bar (x) fillfactor = 70, option = blah;

All without creating any new keywords. You could also place them
before/after the USING clause although there would be some grammer
conflicts there.

Would this be better?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Vertical Partitioning with TOAST
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: problem with large maintenance_work_mem settings and