Re: [Plperlng-devel] Re: Concern about new PL/Perl

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PL/Perl <plperlng-devel(at)pgfoundry(dot)org>
Subject: Re: [Plperlng-devel] Re: Concern about new PL/Perl
Date: 2004-11-17 05:04:47
Message-ID: 200411162104.47899.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew, Peter,

> >It seems that in the new PL/Perl, the result of the spi_exec_query
> >function changes in meaning depending on the command.  For a SELECT,
> >the value of
> >
> >$res->{rows}
> >
> >is a reference to an array of the result rows.
> >
> >For a different command
> >
> >$res->{rows}
> >
> >is a scalar containing the number of affected rows.  I think this is a
> >poor design.  Couldn't we have a different result field that always
> >contains the number of rows?

Hmmm ... while contextual data changes is perlish, substituting a scalar for
an arrayref is going a little far. I agree with Peter, if the second # is
needed, {nrows} makes more sense.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2004-11-17 09:27:06 Re: Minor problem with Makefile.shlib
Previous Message Doug McNaught 2004-11-17 04:31:26 Re: java.lang.ClassNotFoundException