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 function
is 7.3 not 7.4. any other alternative
solution for version after 7.4??
Thank
Ray : )
- Original Message -
From: Rosser Schwarz [EMAIL PROTECTED]
To: Ray [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 11:34 AM
Subject: Re: [PERFORM] create index
Hi All,
I have a table in my postgres:
Table: doc
Column
|
Type |
Modifiers
---+-+---doc_id|
bigint
| not nullcomp_grp_id|
bigint
| not nulldoc_type| character
varying(10)| not nulldoc_urn
| character varying(20)| not null
I want to
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:
Table: doc
Column |Type | Modifiers
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 of
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 | bigint
: [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 USING btree
((SUBSTR(doc_urn,10)));
You need an additional set of parens around
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