Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68311

Re: DB API question - where is a stored procedure's return value?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <petite.abeille@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.035
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'anyway.': 0.05; 'output': 0.05; 'parameter': 0.09; 'solution,': 0.09; 'subject:question': 0.10; 'stored': 0.12; 'foo()': 0.16; 'subject:API': 0.16; 'subject:where': 0.16; 'wrote:': 0.18; 'select': 0.22; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; '13,': 0.31; 'received:google.com': 0.35; 'really': 0.36; 'subject:?': 0.36; 'list': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'ian': 0.60; 'header :Message-Id:1': 0.63; 'such': 0.63; 'charset:windows-1252': 0.65; 'mar': 0.68; 'as:': 0.81; '2014,': 0.84; 'it\x92s': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=JIfZQPRuRm95VLZ/Ldr8U8n07+nls2cmXd1ptbuBpI4=; b=sNSBlvu43HjLxI4sw8FelalYKEsOU03gXVKDzRmX+P8ZbPQK0Gx8ma16Giple1RhtH rNtrCCAQaWNYJW8w8KmaZEgBBfPWGMOCenW9AJf6evEdiWWgpjFRfUdCzbeOqDASOK3p VrVn/ODjipnS0T8Uhs0StyhhslEDc+ouMBAL6cFUBrTZX5ZaWSmq7wHMCt+ngxQ6MhWI TerdnVnHU+e17x9k0FPB2pi0p9KGARP7kkxKiiGm4jjVC/K7sPjyRkyA2hPF7S3nBYy8 biHhMk/Q9gGSFbj4i3msav6TmZKF7qMHMV19jkrEx9BApPYmUGWrEEiAaDYBqWRq0XoK 9UzA==
X-Received by 10.15.99.78 with SMTP id bk54mr95741eeb.65.1394665903740; Wed, 12 Mar 2014 16:11:43 -0700 (PDT)
Content-Type text/plain; charset=windows-1252
Mime-Version 1.0 (Mac OS X Mail 7.2 \(1874\))
Subject Re: DB API question - where is a stored procedure's return value?
From Petite Abeille <petite.abeille@gmail.com>
In-Reply-To <CALwzidm0GJ37JTjUUGPPgEXnZoh0ck08B7i2H4SZXXD1VyDcbA@mail.gmail.com>
Date Thu, 13 Mar 2014 00:11:09 +0100
Content-Transfer-Encoding quoted-printable
References <CANc-5Uz98mTCjUuk_yOHqWeZRwp6JnTCagTQ=bzobhtWAceKxg@mail.gmail.com> <CALwzidm0GJ37JTjUUGPPgEXnZoh0ck08B7i2H4SZXXD1VyDcbA@mail.gmail.com>
To Python <python-list@python.org>
X-Mailer Apple Mail (2.1874)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8114.1394666303.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1394666303 news.xs4all.nl 2967 [2001:888:2000:d::a6]:33474
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68311

Show key headers only | View raw


On Mar 13, 2014, at 12:00 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:

> As a general solution, one might wrap a stored procedure that returns
> a value into a stored procedure that has an output parameter and call
> it with callproc.  Some implementations might include a return value
> in the parameter list anyway.

Alternatively… if it’s really a function… wrap it in a select statement… such as:

select foo() as value from dual

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: DB API question - where is a stored procedure's return value? Petite Abeille <petite.abeille@gmail.com> - 2014-03-13 00:11 +0100
  Re: DB API question - where is a stored procedure's return value? John Gordon <gordon@panix.com> - 2014-03-13 14:43 +0000
    Re: DB API question - where is a stored procedure's return value? Skip Montanaro <skip@pobox.com> - 2014-03-13 10:14 -0500
    Re: DB API question - where is a stored procedure's return value? Chris Angelico <rosuav@gmail.com> - 2014-03-14 04:01 +1100
    Re: DB API question - where is a stored procedure's return value? random832@fastmail.us - 2014-03-13 13:22 -0400
    Re: DB API question - where is a stored procedure's return value? Chris Angelico <rosuav@gmail.com> - 2014-03-14 04:32 +1100

csiph-web