pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #8211: Syntax error when creating index on expression
Date: Wed, 5 Jun 2013 10:26:54 -0700 (PDT)
Message-ID: <1370453214059-5758040.post@n5.nabble.com> (raw)
In-Reply-To: <CAGrpgQ86K8k_aO+PNGjGj-SOnyuuK-yQ46Fk9u7g1mp+HKWa9Q@mail.gmail.com>
References: <E1UkFZc-0001It-KC@wrigleys.postgresql.org>
<CAGrpgQ86K8k_aO+PNGjGj-SOnyuuK-yQ46Fk9u7g1mp+HKWa9Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
bricklen wrote
> expression
>
> An expression based on one or more columns of the table. The expression
> usually must be written with surrounding parentheses, as shown in the
> syntax. However, the parentheses can be omitted if the expression has the
> form of a function call.
So in fact the example provided:
CREATE INDEX ON films ((lower(title)));
could be written as:
CREATE INDEX ON films (lower(title));
The example expression has yet one additional pair of "()" that are not
required per the syntax since lower(...) is a function call. Extra "()"
never hurt I suppose...
I don't see this come up too often on the list but I will agree that it is
unexpected to require the extra set of "()". An example using an actual
expression with the extra "()" and then the function call example without -
to explicitly show when/why they can be omitted in the examples as well as
in the text - is an idea worth considering.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-8211-Syntax-error-when-creating-index-on-expression-tp57...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
view thread (4+ messages)
Message-ID: <1370453214059-5758040.post@n5.nabble.com> Permalink: ../1370453214059-5758040.post@n5.nabble.com/ Also on: postgresql.org/message-id/1370453214059-5758040.post@n5.nabble.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: polobo@yahoo.com Subject: Re: BUG #8211: Syntax error when creating index on expression In-Reply-To: <1370453214059-5758040.post@n5.nabble.com> References: <E1UkFZc-0001It-KC@wrigleys.postgresql.org> <CAGrpgQ86K8k_aO+PNGjGj-SOnyuuK-yQ46Fk9u7g1mp+HKWa9Q@mail.gmail.com> <1370453214059-5758040.post@n5.nabble.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox