I have the following function and I am getting an invalid syntax error
when I try to run it. I have tried the function a number of ways
including with named parameters and non-named parameters using the
args array. I also tried it with a tab at the beginning and without.
I've also tried with the
I don't know plpythonu but python ;-) As I really understood your
problem you want to return strings. In Pytho return(OK ) should work ;-)
Hagen
Sim Zacks wrote:
I have the following function and I am getting an invalid syntax error
when I try to run it. I have tried the function a number of
I had tried it exactly the way I wrote it in python as a function and it
worked.
Just in case I tried changing it to return (OK) as you suggested and
got the same error.
Thank You
Sim Zacks
IT Manager
CompuLab
04-829-0145 - Office
04-832-5251 - Fax
Thanks for the link.
I had already looked at that page, and it gives basically no help at
all. I think the problem is how Pgadmin handles new lines or something
like that. because I can't get any 2 line program to work.
I also tried the code in PSQL and it worked when I indented manually
(hitting
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sim Zacks wrote:
| I have the following function and I am getting an invalid syntax error
| when I try to run it. I have tried the function a number of ways
| including with named parameters and non-named parameters using the
| args array. I also tried
-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
|