Re: Anyone want to fix plperl for null array elements?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Anyone want to fix plperl for null array elements?
Дата
Msg-id 2630.24.211.165.134.1132285487.squirrel@www.dunslane.net
обсуждение исходный текст
Ответ на Anyone want to fix plperl for null array elements?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Anyone want to fix plperl for null array elements?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane said:
> I think plperl should be fixed to translate undef to NULL when
> returning an array, but currently it translates to an empty string:
>
> pl_regression=# CREATE OR REPLACE function returns_array() returns
> text[] as $$ pl_regression$# return ['a,b','c"d',undef,'e-f']; $$
> LANGUAGE plperl; CREATE FUNCTION
> pl_regression=# select returns_array();
>     returns_array
> -----------------------
> {"a,b","c\"d","",e-f}
> (1 row)
>
> There might be some problems going in the other direction, too;
> I haven't tried.  Anybody feeling eager to fix this?
>

I will fix this tomorrow - it's about a 4 line fix. I've missed the details
- we're just using an unquoted NULL in array literals?

cheers

andrew




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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Anyone want to fix plperl for null array elements?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Anyone want to fix plperl for null array elements?