Re: [PERFORM] create index with substr function

2004-10-21 Thread george young
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

Re: [PERFORM] create index with substr function

2004-10-20 Thread Joshua D. Drake
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

Re: [PERFORM] create index with substr function

2004-10-20 Thread Rosser Schwarz
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 -

Re: [PERFORM] create index with substr function

2004-10-20 Thread Ray
; 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

Re: [PERFORM] create index with substr function

2004-10-20 Thread Stephan Szabo
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

Re: [PERFORM] create index with substr function

2004-10-20 Thread Tom Lane
"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

Re: [PERFORM] create index with substr function

2004-10-20 Thread Ray
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

[PERFORM] create index with substr function

2004-10-20 Thread Ray
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_