Re: Concern about new PL/Perl - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Concern about new PL/Perl
Date
Msg-id 4198A284.7070202@dunslane.net
Whole thread Raw
In response to Concern about new PL/Perl  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Concern about new PL/Perl  (Peter Eisentraut <peter_e@gmx.net>)
Re: [Plperlng-devel] Re: Concern about new PL/Perl  (Josh Berkus <josh@agliodbs.com>)
Re: [Plperlng-devel] Re: Concern about new PL/Perl  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers

Peter Eisentraut wrote:

>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?
>  
>

I don't recall seeing any reply to this, but I'm inclined to agree with it.

Joshua, any comment from  CP?

cheers

andrew


pgsql-hackers by date:

Previous
From: Mike Rylander
Date:
Subject: Re: Odd plpgsql behaviour
Next
From: Oleg Bartunov
Date:
Subject: Re: GiST: PickSplit and multi-attr indexes