BUG #5553: Repeating the keyword DECLARE in the CREATE FUNCTION statement - Mailing list pgsql-bugs

From Sergey
Subject BUG #5553: Repeating the keyword DECLARE in the CREATE FUNCTION statement
Date
Msg-id 201007120747.o6C7l7Ra087207@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5553: Repeating the keyword DECLARE in the CREATE FUNCTION statement
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: "Konstantin Kulikov"
Date:
Subject: BUG #5552: incorrect returned value of time
Next
From: David Schmitt
Date:
Subject: Re: BUG #5549: Feature: plpgsql should allow DECLARE cursor FOR EXECUTE '...'