David,
Thanks for the quick reply.
It is working with BEGIN and END.
The code was generated by pgAdmin4 GUI and I somehow incorrectly assumed that GUI would include BEGIN and END statements.
Thanks for your help.
Shahzad
From: David G. Johnston <david.g.johnston@gmail.com> Sent: Wednesday, January 1, 2020 7:02 PMTo: shahzadahmad00@gmail.com; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>Subject: Re: BUG #16181: Error Creating Stored Procedures
On Wed, Jan 1, 2020 at 4:43 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:Bug reference: 16181Logged by: Shahzad AhmadEmail address: shahzadahmad00@gmail.comPostgreSQL version: 12.1Operating system: Ubuntu 18.04.3 LTSDescription: I tried both pgAdmin GUI and psql using a script file. In both instances igot 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.
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных