BUG #13909: String concat error with CITEXT after 9.5.0 upgrade.

Поиск
Список
Период
Сортировка
От hein@bitechsystems.co.za
Тема BUG #13909: String concat error with CITEXT after 9.5.0 upgrade.
Дата
Msg-id 20160203151723.2768.51719@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #13909: String concat error with CITEXT after 9.5.0 upgrade.
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13909
Logged by:          Hein
Email address:      hein@bitechsystems.co.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 ;

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #13910: synchronous replication not sync data occasionally
Следующее
От: Seth P
Дата:
Сообщение: Re: BUG #13908: Query returns too few rows