Re: trying to pattern match to a value contained in a column - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: trying to pattern match to a value contained in a column
Date
Msg-id 200012091927.OAA21186@candle.pha.pa.us
Whole thread Raw
In response to Re: trying to pattern match to a value contained in a column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
> Beth Gatewood <bethg@mbt.washington.edu> 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,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Kyle
Date:
Subject: Re: "drop constraint trigger" on PostgreSQL
Next
From: Michel Vrand
Date:
Subject: Query optimisation