From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Beth Gatewood <bethg(at)mbt(dot)washington(dot)edu>, Francis Solomon <francis(at)stellison(dot)co(dot)uk>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: trying to pattern match to a value contained in a column |
Date: | 2000-12-09 19:27:07 |
Message-ID: | 200012091927.OAA21186@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> Beth Gatewood <bethg(at)mbt(dot)washington(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Michel Vrand | 2000-12-11 15:20:33 | Query optimisation |
Previous Message | feblec | 2000-12-09 08:16:06 | plpgsql |