Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial
В списке pgsql-hackers по дате отправления:
| От | Andrew Dunstan |
|---|---|
| Тема | Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial |
| Дата | |
| Msg-id | 4B43A2CE.7010209@dunslane.net обсуждение исходный текст |
| Ответ на | Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial
|
| Список | pgsql-hackers |
Tom Lane wrote:
> I'm not nearly good enough in Perl to be sure about the semantics
> of this loop. Is it possible that it's changing the global contents
> of the @$data structure, rather than just hacking a local copy of
> each row before pushing some values into @fmgr?
>
That's exactly what it does. The loop variable is an alias. See
perlsyn(1) for details.
These two lines appear to be suspicious:
$row->{bki_values} =~ s/"[^"]*"/"xxx"/g; @{$row}{@attnames} = split /\s+/, $row->{bki_values};
Something like:
(my $bkival = $row->{bki_values}) =~ s/"[^"]*"/"xxx"/g; my $atts = {}; @{$atts}{@attnames} = split /\s+/,
$bkival;
might work better.
cheers
andrew
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера