On Thu, Jul 03, 2008 at 11:11:26AM -0400, Tom Lane wrote:
> Sam Mason <[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 opclasses
> into the sy
Sam Mason <[EMAIL PROTECTED]> writes:
> You just want an extra set of brackets; i.e.:
> CREATE INDEX token_position_func ON token ((position+1));
> Should do the trick. Not entirely sure why, but it'll probably have
> something to do with avoiding ambiguity in the grammar.
Right. The problem
"Gregory Stark" <[EMAIL PROTECTED]> writes:
> CREATE INDEX token_position_func on (token(position+1))
Ooops, I misread that as if "token" were a function and not the table. Sam
Mason had the right syntax. Sorry.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me ab
<[EMAIL PROTECTED]> writes:
> Hi all:
>
> I'm trying to create a functional index into column position of token
> table (see below). I want to make something like:
>
> CREATE INDEX token_position_func
> ON token (position+1);
>
> but I get:
>
> test=# CREATE INDEX token_position_func
> test-# ON t
On Thu, Jul 03, 2008 at 11:50:39AM +0200, [EMAIL PROTECTED] wrote:
> test=# CREATE INDEX token_position_func
> test-# ON token (position+1);
> ERROR: syntax error at or near "+"
> LINE 2: ON token (position+1);
>
> I read that I can do "ON function(column)" but, is there a built-in
> function in
am Thu, dem 03.07.2008, um 11:50:39 +0200 mailte [EMAIL PROTECTED] folgendes:
> Hi all:
>
> I'm trying to create a functional index into column position of token
> table (see below). I want to make something like:
>
> CREATE INDEX token_position_func
> ON token (position+1);
>
> but I get:
>
>
Hi all:
I'm trying to create a functional index into column position of token
table (see below). I want to make something like:
CREATE INDEX token_position_func
ON token (position+1);
but I get:
test=# CREATE INDEX token_position_func
test-# ON token (position+1);
ERROR: syntax error at or nea