for doing a simple full text-search I add the following where-clause:
select c1,c2,c3...,c9 from table where c1||c2||c3 .. ||c9 ~ 'searchtext';
This seems to work even with integers or timestamps. Unfortunately it does not work with char-fields:
author | varchar(100) |
valid | char(1) |
#select author||valid from table;
ERROR: Unable to identify an operator '||' for types 'varchar' and 'bpchar'
You will have to retype this query using an explicit cast
Is there any way to ship around this problem or any more correct way
to avoid such errors in the future with different types.
thnx,
peter
--
mag. peter pilsl
phone: +43 676 3574035
fax : +43 676 3546512
email: pilsl@goldfisch.at
sms : pilsl@max.mail.at
pgp-key available