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;
   @{$ro...@attnames} = split /\s+/, $row->{bki_values};

Something like:

   (my $bkival = $row->{bki_values}) =~ s/"[^"]*"/"xxx"/g;
   my $atts = {};
   @{$att...@attnames} = split /\s+/, $bkival;

might work better.

cheers

andrew


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to