Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Functional ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 15965 of 16557
Post > Topic >>

Re: Functional index adding one

by sam@[EMAIL PROTECTED] (Sam Mason) Jul 3, 2008 at 05:00 PM

On Thu, Jul 03, 2008 at 11:11:26AM -0400, Tom Lane wrote:
> Sam Mason <sam@[EMAIL PROTECTED]
> writes:
> > Not entirely sure why, but it'll probably have
> > something to do with avoiding ambiguity in the grammar.
> 
> Right.  The problem is the Berkeley-era decision to put index opcl*****
> into the syntax without any keyword or punctuation, viz
> 
> 	create index ... on table (column_name [ opclass_name ]);
> 
> So something like
> 
> 	CREATE INDEX token_position_func ON token (a + b);
> 
> is ambiguous: is the + an infix operator, or is it a postfix operator
> and the "b" is to be taken as an opclass name?

In this case it seems unambiguous, but in general I can see why.
Hysterical raisins cause all sorts of fun!

> We hacked around that by requiring parens around expressions.  For
> backwards compatibility with other Berkeley-era syntax, there's
> a special exception that you can omit the parens when the expression is
> just a function call.

I'm tempted to say "how about putting another example in the page" but
it seems to do***ent the issue quite well already.

I've never liked to putting comments into the interactive version of the
manual, mainly because they disappear with each major version, but how
about having the manual link to the wiki?  At the moment, the wiki seems
somewhat isolated and I never seem to find myself using it.  If there
were some nice trails in, maybe it would be used more; somewhere like:

  http://wiki.postgresql.org/wiki/Manual/sql-createindex

I wouldn't worry about versioning, just let the authors of the pages
deal with versioning issues in ways appropriate to the subject.  Or has
this idea been dismissed before?


  Sam

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 7 Posts in Topic:
Functional index adding one
lbarcala@[EMAIL PROTECTED  2008-07-03 11:50:39 
Re: Functional index adding one
andreas.kretschmer@[EMAIL  2008-07-03 12:11:20 
Re: Functional index adding one
sam@[EMAIL PROTECTED] (S  2008-07-03 14:19:49 
Re: Functional index adding one
tgl@[EMAIL PROTECTED] (T  2008-07-03 11:11:26 
Re: Functional index adding one
sam@[EMAIL PROTECTED] (S  2008-07-03 17:00:31 
Re: Functional index adding one
stark@[EMAIL PROTECTED]   2008-07-03 14:37:18 
Re: Functional index adding one
stark@[EMAIL PROTECTED]   2008-07-03 15:21:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 13:12:06 CDT 2008.