BUG #6295: Update fails on empty concatenated strings

From: "Jonas Forsman" <jfo123(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6295: Update fails on empty concatenated strings
Date: 2011-11-16 08:47:12
Message-ID: 201111160847.pAG8lCdx067272@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 6295
Logged by: Jonas Forsman
Email address: jfo123(at)hotmail(dot)com
PostgreSQL version: 8.4.9
Operating system: Ubuntu 10.04 LTS
Description: Update fails on empty concatenated strings
Details:

Field description (note the field name is "comment") :
comment character varying(2048)

sql:
UPDATE user SET comment= E'[2011-11-16] Note to myself no: 171\\n' ||
comment WHERE userid=1

This query fails if comment is an empty string or null.

This works:

UPDATE user SET comment= E'[2011-11-16] Note to myself no: 171\\n' ||
comment || '' WHERE userid=1

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Maksym Boguk 2011-11-16 09:07:55 BUG #6296: High level backend-write activity on db
Previous Message CN 2011-11-16 08:18:56 Re: BUG #6294: character 0xefbd9e of encoding "UTF8" has no equivalent in "BIG5"