[HACKERS] plpgsql on 8.0b4 bug?

2004-11-18 Thread James Robinson
It seems that 8.0B4's plpgsql does not diagnose 'ELSIF' being misspelled as 'ELSEIF' nearly as readily as did 7.4.x. 7.4 emits a compile error at the right place, whereas 8.0b4 seems to treat misspelled 'ELSEIF' blocks as unreachable code, making it quite hard to diagnose what is actually

Re: [HACKERS] plpgsql on 8.0b4 bug?

2004-11-18 Thread Tom Lane
James Robinson [EMAIL PROTECTED] writes: 7.4.6 results: xs2 /tmp psql ssc_sav pets.sql BEGIN ALTER TABLE CREATE FUNCTION ERROR: syntax error at or near ELSEIF at character 1 CONTEXT: PL/pgSQL function fix_pets line 16 at SQL statement Um ... I get the no code determined message in 7.4.6

Re: [HACKERS] plpgsql on 8.0b4 bug?

2004-11-18 Thread James Robinson
Hmm. Teach me to not send in the exact script / dataset that caused the issue. Indeed, I must have (luckily) had a separate syntax error in the version that caused the 7.4.6 parser to trip up on the ELSEIF line (it did happen else I'd still be staring at the thing). Humble apologies and

Re: [HACKERS] plpgsql on 8.0b4 bug?

2004-11-18 Thread Tom Lane
James Robinson [EMAIL PROTECTED] writes: Hmm. Teach me to not send in the exact script / dataset that caused the issue. Indeed, I must have (luckily) had a separate syntax error in the version that caused the 7.4.6 parser to trip up on the ELSEIF line (it did happen else I'd still be

Re: [HACKERS] plpgsql on 8.0b4 bug?

2004-11-18 Thread James Robinson
Between ugly #1 and ugly #2, I'd think that a wart teaching it that 'ELSEIF' is not a valid manner to start a statement (i.e. following a semicolon) would be preferable. Allowing us hacks to write functions containing both spellings makes the language look poor since it ought to slap us into