From: Tom Lane <tgl@sss.pgh.pa.us>
To: webmaster@tony.cz
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] String concat operator???
Date: Wed, 30 Jun 1999 10:18:06 -0400
Message-ID: <21995.930752286@sss.pgh.pa.us> (raw)
In-Reply-To: <99063015213102.00441@localhost.localdomain>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, webmaster@tony.cz
Subject: Re: [SQL] String concat operator???
In-Reply-To: <21995.930752286@sss.pgh.pa.us>
References: <99063015213102.00441@localhost.localdomain> <21995.930752286@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox