BUG #5553: Repeating the keyword DECLARE in the CREATE FUNCTION statement

Started by Sergeyalmost 16 years ago2 messagesbugs
Jump to latest
#1Sergey
sklo@mail.ur.ru

The following bug has been logged online:

Bug reference: 5553
Logged by: Sergey
Email address: sklo@mail.ur.ru
PostgreSQL version: 9 beta 2
Operating system: Windows XP
Description: Repeating the keyword DECLARE in the CREATE FUNCTION
statement
Details:

Is it a normal behavior of the parser:

CREATE OR REPLACE FUNCTION row_ret13(b_in IN BOOLEAN = true or false,
INTEGER DEFAULT 0 )
RETURNS BOOLEAN
AS
$$
DECLARE
DECLARE
DECLARE a integer DEFAULT 32;
DECLARE
DECLARE
DECLARE
DECLARE
DECLARE b integer DEFAULT 32;
DECLARE
DECLARE
BEGIN
RETURN FALSE OR b_in;
END;
$$
LANGUAGE PLPGSQL;

- Parsed.

select row_ret13();
======
t

Thanks,
Sergey.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Sergey (#1)
Re: BUG #5553: Repeating the keyword DECLARE in the CREATE FUNCTION statement

"Sergey" <sklo@mail.ur.ru> writes:

Description: Repeating the keyword DECLARE in the CREATE FUNCTION
statement

Is it a normal behavior of the parser:

Yes. This isn't a bug, you've just written a bunch of empty DECLARE
sections.

regards, tom lane