Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group