Re: plpython question

From: Stuart Bishop <stuart(at)stuartbishop(dot)net>
To: Stuart Bishop <stuart(at)stuartbishop(dot)net>
Cc: Sim Zacks <sim(at)compulab(dot)co(dot)il>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpython question
Date: 2004-10-20 05:40:04
Message-ID: 4175FA34.5010806@stuartbishop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stuart Bishop wrote:

| create or replace function BatchBalanceStatus(int, int, int) returns
| varchar as '
| ~ balance, needed, freestock = args
| ~ if balance < 0:
| ~ return "Unhandled"
| ~ elif freestock >= needed:
| ~ return "OK"
| ~ else:
| ~ return "Ordered"
| ' language plpythonu;
|
| Works just fine here on 7.4.5

Urgh... minus the ~ characters of course that my mail program helpfully
inserted :-P

- --
Stuart Bishop <stuart(at)stuartbishop(dot)net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBdfo0AfqZj7rGN0oRAu0DAKCX1RknM3U+iDMAixKrJtQlSMPVIgCfYA5A
YVvTTcARsnzB8EHVVIc1J+8=
=cdg/
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-10-20 06:05:44 Re: Where clause limited to 8 items?
Previous Message Stuart Bishop 2004-10-20 05:37:46 Re: plpython question