From: | hein(at)bitechsystems(dot)co(dot)za |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #13909: String concat error with CITEXT after 9.5.0 upgrade. |
Date: | 2016-02-03 15:17:23 |
Message-ID: | 20160203151723.2768.51719@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 13909
Logged by: Hein
Email address: hein(at)bitechsystems(dot)co(dot)za
PostgreSQL version: 9.5.0
Operating system: Windows 10 / Linux
Description:
After upgrading to 9.5 with a new database, concatenation of a citext and a
function that returns citext does not work. It gives a syntax error.
Code to duplicate, requires citext extension:
CREATE OR REPLACE FUNCTION isnull(
p_value citext
,p_replacevalue citext = ''
)
RETURNS citext
AS $$
select case when p_value is null then p_replacevalue else p_value end
$$ LANGUAGE sql IMMUTABLE COST 1;
DO
$$
DECLARE
m_text citext;
BEGIN
m_text = 'test' || isnull(m_text,''); --code breaks here!
--raise notice '%', isnull(m_text);
END;
$$ LANGUAGE plpgsql ;
From | Date | Subject | |
---|---|---|---|
Next Message | wangzilong | 2016-02-04 00:45:11 | BUG #13910: synchronous replication not sync data occasionally |
Previous Message | Michael Paquier | 2016-02-03 14:28:18 | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby |