Skip site navigation (1) Skip section navigation (2)

Re: [JDBC] Where are we on stored procedures?

From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Where are we on stored procedures?
Date: 2005-02-25 14:44:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
Hash: SHA1

Tom Lane wrote:
| "Francisco Figueiredo Jr." <fxjrlists(at)yahoo(dot)com(dot)br> writes:
|>Could I add another item?
|>Could we have the row count of statements executed inside a
|>procedure/function returned to client?
| IMHO that request is completely bogus; if the procedure wants to tell
| the client that, it's the procedure's responsibility to return the
| number as a result.  Doing what you ask (a) would arguably be a security
| violation, and (b) the info would be impossible for the client to
| interpret in any but the most trivial cases anyway.  Consider for
| instance a procedure that contains different queries in the THEN and
| the ELSE arms of an IF, or contains loops executed a variable number
| of times.  Without access to the results of the control flow tests, the
| client could not know which number means what.

Hi Tom Lane.

Thanks for feedback.

In fact, I think people keep requesting me support on Npgsql for that
because MS Sql server supports it and they are porting their code to use
Postgresql and facing that difficult.

Indeed, for (a) we could use an approach similar to Ms sql server. We
could have a way of the procedure say if it wanted to send the rows
affected information or not.
And about (b) I think that it is only on trivial cases that people
really want to use this feature :)

But thinking on other side I think this in only a differ in backend's
idiom. I already answered your solution of get diagnostics and I will
provide a litle FAQ about it so people can see how it is done on postgresql.


Francisco Figueiredo Jr.

- --

Francisco Figueiredo Jr.
Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founder Member

- -------------
"Science without religion is lame;
religion without science is blind."

~                  ~ Albert Einstein
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


In response to


pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2005-02-25 14:52:56
Subject: Re: Some download statistics
Previous:From: Marc G. FournierDate: 2005-02-25 14:42:57
Subject: Re: Development Plans

pgsql-jdbc by date

Next:From: Tom LaneDate: 2005-02-25 15:13:23
Subject: Re: Where are we on stored procedures?
Previous:From: Kovács PéterDate: 2005-02-25 13:27:49
Subject: Statement level transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group