Re: pl/perl and utf-8 in sql_ascii databases

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: pl/perl and utf-8 in sql_ascii databases
Дата
Msg-id CAFaPBrSQs=SFKEbTHi5+mjrNJjme-kDSCKF1AbkKfYsFrVGjBg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pl/perl and utf-8 in sql_ascii databases  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: pl/perl and utf-8 in sql_ascii databases  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
On Thu, Jun 21, 2012 at 5:22 AM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:

>> So I played a bit with this patch, and touched it a bit mainly
>> [...] functions in Util.xs might leak some memory, so I made an attempt to

> Ok, Is it ok to look into the newer patch including fix of leaks
> at first?

Yeah :-).

> Variable naming in util_quote_*() seems a bit confusing,
>
> Renaming ret to quoted and str to ret as the patch attached might
> make it easily readable.

Ok.

>> [ regression failure on a  SQL_ASCII database ]
>> I'm not really sure what to do here -- maybe have a second expected file
>> for that test is a good enough answer?  Or should I just take the test
>> out?  Opinions please.

> The attached ugly patch does it. We seem should put NO_LOCALE=1
> on the 'make check' command line for the encodings not compatible
> with the environmental locale, although it looks work.

+REGRESS_LC0 = $(subst .sql,,$(shell cd sql; ls plperl_lc_$(shell echo
$(ENCODING) | tr "A-Z-" "a-z_").sql 2>/dev/null))
+REGRESS_LC = $(if $(REGRESS_LC0),$(REGRESS_LC0),plperl_lc)
+REGRESS = plperl $(REGRESS_LC) plperl_trigger plperl_shared
plperl_elog plperl_util plperl_init plperlu plperl_array

Hrm, that's quite cute. I dunno if there is a more cannon way of doing
the above-- but it seems to work. I'm not sure this regression test is
worth it. I'm thinking maybe we should just remove
theegressionegression test instead.

There is a minor issue with the patch where
sql/plperl_lc_sql_ascii.sql contains the text "plperl_lc.sql". After
copying sql/plperl_lc.sql to sql/plperl_lc_sql_ascii.sql everything
worked as described.

Thanks for the review!


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Catalog/Metadata consistency during changeset extraction from wal
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Catalog/Metadata consistency during changeset extraction from wal