Re: BUG #16181: Error Creating Stored Procedures

"David G. Johnston" <[email protected]> Wed, 1 Jan 2020 17:01:32 -0700
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <CAKFQuwYeco+sqTV4qpFob7egVUFe3nqSPZdbx_+GS=L0jRianQ@mail.gmail.com>
On Wed, Jan 1, 2020 at 4:43 PM PG Bug reporting form <[email protected]>
wrote:

> The following bug has been logged on the website:
>
> Bug reference:      16181
> Logged by:          Shahzad Ahmad
> Email address:      [email protected]
> PostgreSQL version: 12.1
> Operating system:   Ubuntu 18.04.3 LTS
> Description:
>
> I tried both pgAdmin GUI and psql using a script file. In both instances i
> got the same error.
>
> CREATE OR REPLACE PROCEDURE admin.my_test(IN role_id integer DEFAULT 0)
> LANGUAGE 'plpgsql'
>

Not a bug...the documentation shows how to write a pl/pgsql function/stored
procedure.

https://www.postgresql.org/docs/12/plpgsql-structure.html

Note the "BEGIN" and "END" portions of that syntax diagram are not optional.

David J.