python-database

C

Cliff Wells

is there any way to call stored procedures from python as in java?

I mostly use PostgreSQL, so perhaps it's different for some other
databases, but calling stored procedures doesn't require any special
support from the language or driver. Usually you simply SELECT from the
stored procedure.

Also, you might be interested to know that with PostgreSQL you can also
*write* stored procedures in Python which I consider a huge plus.

Regards,
Cliff

--
 
S

skip

Cliff> I mostly use PostgreSQL, so perhaps it's different for some other
Cliff> databases, but calling stored procedures doesn't require any
Cliff> special support from the language or driver. Usually you simply
Cliff> SELECT from the stored procedure.

In a stored procedure you can execute multiple SELECTs. On the receiving
end you need some way to distinguish each result set.

Skip
 
D

Dennis Lee Bieber

In a stored procedure you can execute multiple SELECTs. On the receiving
end you need some way to distinguish each result set.
If the database itself supports multiple result sets, then the
db-api implementation should support the optional

cursor.nextset()

method (Note: I believe that's a one-way street -- better fetch all data
from one set before asking for the next one)
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top