Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
Hi Ivan, > It seems anyway that the usefulness of this feature largely depends > on the language library. > eg. I can't see a way to support it with php right now but it is > supported by python. > Am I missing something? Yes, the client library will have to support multiple result sets too. For example, the PHP MySQLi lib does that by providing functions to check for and retrieve outstanding result sets in the buffer: bool mysqli_more_results ($link) bool mysqli_next_result ($link) It seems like the PHP PG binding does allow (?) retrieval of multiple result sets through pg_get_result(), but only for requests issued asynchronously: http://bg2.php.net/manual/en/function.pg-get-result.php > Out of curiosity, what language are you using? For MySQL I've been mostly using PHP, occasionally Java, Python and C. Vladimir -- Vladimir Dzhuvinov * www.valan.net * PGP key ID AC9A5C6C
Re: Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
От:
Ivan Sergio Borgonovo <mail@webthatworks.it>
Дата:
On Mon, 13 Oct 2008 16:48:33 +0300 Vladimir Dzhuvinov wrote: > It seems like the PHP PG binding does allow (?) retrieval of > multiple result sets through pg_get_result(), but only for > requests issued asynchronously: > http://bg2.php.net/manual/en/function.pg-get-result.php Interesting. > > Out of curiosity, what language are you using? > > For MySQL I've been mostly using PHP, occasionally Java, Python > and C. pardon the noise I forgot to check mysql*i* functions. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it
Re: Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Vladimir Dzhuvinov wrote: -- Start of PGP signed section. > Hi Ivan, > > > It seems anyway that the usefulness of this feature largely depends > > on the language library. > > eg. I can't see a way to support it with php right now but it is > > supported by python. > > Am I missing something? > > Yes, the client library will have to support multiple result sets too. > > For example, the PHP MySQLi lib does that by providing functions to > check for and retrieve outstanding result sets in the buffer: > > bool mysqli_more_results ($link) > > bool mysqli_next_result ($link) > > > It seems like the PHP PG binding does allow (?) retrieval of multiple > result sets through pg_get_result(), but only for requests issued > asynchronously: > > http://bg2.php.net/manual/en/function.pg-get-result.php > > > > Out of curiosity, what language are you using? > > For MySQL I've been mostly using PHP, occasionally Java, Python and C. Interesting. I think we need to decide if we want a TODO for this. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
От:
"Pavel Stehule" <pavel.stehule@gmail.com>
Дата:
Hello 2008/10/15 Bruce Momjian : > Vladimir Dzhuvinov wrote: > -- Start of PGP signed section. >> Hi Ivan, >> >> > It seems anyway that the usefulness of this feature largely depends >> > on the language library. >> > eg. I can't see a way to support it with php right now but it is >> > supported by python. >> > Am I missing something? >> >> Yes, the client library will have to support multiple result sets too. >> >> For example, the PHP MySQLi lib does that by providing functions to >> check for and retrieve outstanding result sets in the buffer: >> >> bool mysqli_more_results ($link) >> >> bool mysqli_next_result ($link) >> >> >> It seems like the PHP PG binding does allow (?) retrieval of multiple >> result sets through pg_get_result(), but only for requests issued >> asynchronously: >> >> http://bg2.php.net/manual/en/function.pg-get-result.php >> >> >> > Out of curiosity, what language are you using? >> >> For MySQL I've been mostly using PHP, occasionally Java, Python and C. > > Interesting. I think we need to decide if we want a TODO for this. > year ago I wrote prototype: http://okbob.blogspot.com/2007/11/stacked-recordset-multirecordset.html http://okbob.blogspot.com/2007/11/first-real-procedures-on-postgresql.html regards Pavel Stehule > -- > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com > > + If your life is a hard drive, Christ can be your backup. + > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >
Re: Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Added to TODO: Add support for returning multiple result sets? * http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php --------------------------------------------------------------------------- Pavel Stehule wrote: > Hello > > 2008/10/15 Bruce Momjian : > > Vladimir Dzhuvinov wrote: > > -- Start of PGP signed section. > >> Hi Ivan, > >> > >> > It seems anyway that the usefulness of this feature largely depends > >> > on the language library. > >> > eg. I can't see a way to support it with php right now but it is > >> > supported by python. > >> > Am I missing something? > >> > >> Yes, the client library will have to support multiple result sets too. > >> > >> For example, the PHP MySQLi lib does that by providing functions to > >> check for and retrieve outstanding result sets in the buffer: > >> > >> bool mysqli_more_results ($link) > >> > >> bool mysqli_next_result ($link) > >> > >> > >> It seems like the PHP PG binding does allow (?) retrieval of multiple > >> result sets through pg_get_result(), but only for requests issued > >> asynchronously: > >> > >> http://bg2.php.net/manual/en/function.pg-get-result.php > >> > >> > >> > Out of curiosity, what language are you using? > >> > >> For MySQL I've been mostly using PHP, occasionally Java, Python and C. > > > > Interesting. I think we need to decide if we want a TODO for this. > > > > year ago I wrote prototype: > http://okbob.blogspot.com/2007/11/stacked-recordset-multirecordset.html > http://okbob.blogspot.com/2007/11/first-real-procedures-on-postgresql.html > > regards > Pavel Stehule > > > > -- > > Bruce Momjian http://momjian.us > > EnterpriseDB http://enterprisedb.com > > > > + If your life is a hard drive, Christ can be your backup. + > > > > -- > > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-general > > -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +