Received: from thor.tht.net (thor.tht.net [209.47.145.4]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB9JadZ49528 for ; Sat, 9 Dec 2000 14:36:39 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: from candle.pha.pa.us (pgman@candle.navpoint.com [162.33.245.46]) by thor.tht.net (8.9.3/8.9.3) with ESMTP id PAA28654 for ; Sat, 9 Dec 2000 15:27:20 GMT (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id OAA21186; Sat, 9 Dec 2000 14:27:07 -0500 (EST) From: Bruce Momjian Message-Id: <200012091927.OAA21186@candle.pha.pa.us> Subject: Re: trying to pattern match to a value contained in a column In-Reply-To: <28352.976231914@sss.pgh.pa.us> "from Tom Lane at Dec 7, 2000 06:31:54 pm" To: Tom Lane Date: Sat, 9 Dec 2000 14:27:07 -0500 (EST) CC: Beth Gatewood , Francis Solomon , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200012/66 X-Sequence-Number: 397 > Beth Gatewood writes: > > I hope this isn't because I am using 6.3 (yes...I know it is very very > > old but this is currently where the data is!) > > > here is the query: > > select * from av34s1 where chromat ~~ ('%' || sample || '%'); > > ERROR: parser: syntax error at or near "||" > > I seem to recall that || (and most other operators) wasn't > considered associative by the grammar way back when. > Try a fully parenthesized expression: Yes || had strange problems in those releases. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026