Error when creating a stored procedure in postgreSQL-10
As mentioned in the comments, PostgreSQL-10 does not have stored procedures. Same is true about earlier versions.

Workaround alternatives:


Upgrade to version 11 or later
Use a function


Thanks, @Erwin Brandstetter and @a_horse_with_no_name