Re: [PERFORM] create index with substr function

2004-10-21 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 function

Re: [PERFORM] create index with substr function

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

[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 nullcomp_grp_id| bigint | not nulldoc_type| character varying(10)| not nulldoc_urn | character varying(20)| not null I want to

Re: [PERFORM] create index with substr function

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

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 of

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 | bigint

Re: [PERFORM] create index with substr function

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

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