webmaster <webmaster@tony.cz> writes:
> update temp_kat set id_look = substr(ident,1,6) || '-' || substr(ident,7,7)
> where from_kat='P';
> Both id_look and ident are varchars.. So what's wrong with || operator? There
> is an error parsing the querry near || ...
In 6.4.* you have to parenthesize the above because Postgres doesn't
assume that the operator || is associative:
update temp_kat set id_look = (substr(ident,1,6) || '-') || substr(ident,7,7)
where from_kat='P';
6.5 takes the query without parentheses...
regards, tom lane