Re: [GENERAL] A plpgsql unidentifiable problem.

2008-06-20 Thread Igor Neyman
Easy: you've got 3 Ifs without "END IF": IF uppergt = 'BOD' THEN RETURN 0 ; IF uppergt = 'MOD' THEN RETURN 86400/2 ; IF uppergt = 'EOD' THEN RETURN 86399 ; Igor -Original Message- From: Ralph Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 3:19 PM To: pgsql-general@

Re: [GENERAL] A plpgsql unidentifiable problem.

2008-06-19 Thread Ralph Smith
Yes, that was it. The other QUITE similar language I've used didn't require the END IF if it was a one-liner. You can bet I won't forget that one again - or longer than it takes to goof up and rediscover it! Thanks! Ralph On Jun 19, 2008, at 12:4

Re: [GENERAL] A plpgsql unidentifiable problem.

2008-06-19 Thread Philippe Grégoire
I think that the IF clauses need END IF. IF uppergt = 'BOD' THEN RETURN 0; END IF; IF uppergt = 'MOD' THEN RETURN 86400/2; END IF; IF uppergt = 'EOD' THEN RETURN 86399; END IF; This should solve the problem. Philippe Gregoire Information Manager www.boreal-is.com Ralph Smith wrote: I'm b

Re: [GENERAL] A plpgsql unidentifiable problem.

2008-06-19 Thread Philippe Grégoire
And the semi-colon should be removed after the END Philippe Philippe wrote: I think that the IF clauses need END IF. IF uppergt = 'BOD' THEN RETURN 0; END IF; IF uppergt = 'MOD' THEN RETURN 86400/2; END IF; IF uppergt = 'EOD' THEN RETURN 86399; END IF; This should solve the problem. Phili

[GENERAL] A plpgsql unidentifiable problem.

2008-06-19 Thread Ralph Smith
I'm baffled and have tried various variations but still nogo. From PgAdmin III I get: --- ** Error ** ERROR: syntax error at or near ";" SQL state: 42601 Character: 19001 -- referring to the semi-colon after the 'END' statement.