lt;[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, October 21, 2004 11:34 AM
> Subject: Re: [PERFORM] create index with substr function
>
>
> > while you weren't looking, Ray wrote:
> >
> > > CREATE INDEX idx_doc_substr_doc_urn ON doc
Tom Lane wrote:
"Ray" <[EMAIL PROTECTED]> writes:
CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree (SUBSTR(doc_urn,10));
ERROR: parser: parse error at or near "10" at character 68
This will work in 7.4, but not older releases.
Can't you just use a SQL functio
while you weren't looking, Ray wrote:
> CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree (SUBSTR(doc_urn,10));
CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree ((SUBSTR(doc_urn,10)));
You need an additional set of parens around the SUBSTR() call.
/rls
--
:wq
-
;
Sent: Thursday, October 21, 2004 11:34 AM
Subject: Re: [PERFORM] create index with substr function
> while you weren't looking, Ray wrote:
>
> > CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree
(SUBSTR(doc_urn,10));
>
> CREATE INDEX idx_doc_substr_doc_urn ON doc USI
On Thu, 21 Oct 2004, Ray wrote:
> Hi All,
>
> I have a table in my postgres:
> Table: doc
> Column |Type | Modifiers
> ---+-+---
> doc_id | bigint | not null
> comp_grp_id | bigin
"Ray" <[EMAIL PROTECTED]> writes:
> CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree (SUBSTR(doc_urn,10));
> ERROR: parser: parse error at or near "10" at character 68
This will work in 7.4, but not older releases.
regards, tom lane
---(end
ot; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 21, 2004 10:57 AM
Subject: Re: [PERFORM] create index with substr function
>
> On Thu, 21 Oct 2004, Ray wrote:
>
> > Hi All,
> >
> > I have a table in my postgres:
> > T
Hi All,
I have a table in my postgres:
Table: doc
Column
|
Type |
Modifiers
---+-+--- doc_id |
bigint
| not null comp_grp_id |
bigint
| not null doc_