-----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@stuartbishop.net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBdfo0AfqZj7rGN0oRAu0DAKCX1RknM3U+iDMAixKrJtQlSMPVIgCfYA5A
YVvTTcARsnzB8EHVVIc1J+8=
=cdg/
-----END PGP SIGNATURE-----