| От | Josh Berkus |
|---|---|
| Тема | Re: [Plperlng-devel] Re: Concern about new PL/Perl |
| Дата | |
| Msg-id | 200411162104.47899.josh@agliodbs.com обсуждение исходный текст |
| Ответ на | Re: Concern about new PL/Perl (Andrew Dunstan <andrew@dunslane.net>) |
| Список | 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
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера