Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1imxVX-0001Q8-Jl for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jan 2020 10:15:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1imxVV-0008AN-F6 for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jan 2020 10:15:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1imoCL-0004yt-JJ for pgsql-bugs@lists.postgresql.org; Thu, 02 Jan 2020 00:18:45 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1imoCE-00020I-7k for pgsql-bugs@lists.postgresql.org; Thu, 02 Jan 2020 00:18:45 +0000 Received: by mail-qk1-x732.google.com with SMTP id z76so30725249qka.2 for ; Wed, 01 Jan 2020 16:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :thread-index:content-language; bh=CI1/vOVuOGr1vVNh5/rOa6i5NR9N/OtBeBogvI2W3ME=; b=PvuNGqu6G9e7TpzU0bJR0rhQepzpu/qirtELQhDaW7Hh8+peEDeMWDY93plelq24Z/ Q6jIr3krS2kABLl5aX/XlwVQMzg8V8yZxO6/P1ZdNRC+9NLTgtSACD1i9mGcf5/zPqVb pXa/wB6nY8qCmvXbfjoj2CPAdn5MZeK1P0zQPkum9771s4ax153sxQRdiAENsJ0CDL53 T+OSUhp9kCK8F2wxP4HJnDTxQbkvr+JGU0b1S9DXbVtppd4T0TA9Xb99ffccm8j/Z6gF NnKcNXJ3eo2Rnnu9NrtuDbdxMK5HO6o115GHY+Id5KlgxdIAkn3zP2fM5ThoQH7ZEkc6 AgxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:thread-index:content-language; bh=CI1/vOVuOGr1vVNh5/rOa6i5NR9N/OtBeBogvI2W3ME=; b=im3JVxQBwQhxQ046cjIgsWnWKHtwjqhFMaDpxNkeVd9T5y3M0k4lcKPLIa3SyxTEuk x8NZc9SvYTDT5eU+rEfGLexvz5RSmSJLePdA1wbnYh6Sbg14TptwbXTwLjFIUZMuIk8e ZQJ4chh0jaVBWN632VOhJYfCg2MlTlB9+IU2zkYlsIjC8bd8F8hqhAs/Pm5aiZUUsN6R XC/X5AinNI1UNJD74XTkE/b7oNSQJxizR3CuP6VUcfWNhOfM8v2e2D5vQxOIqNG72NBf oHDMbWaJtGqObdY2m6+BbyIJLAJmVLWPjiSW/4Tuyrj0LHCeRLF7r4AkV8XLzokU9rKB SMTQ== X-Gm-Message-State: APjAAAUvgq7AV3BvXmpn+OB25I7hhGPETs/gwQjH0bXSsZnZ0/Pba9kS PyvmPTCkizKe0nB67IyUi4E= X-Google-Smtp-Source: APXvYqzVimYmgurDWn50FF42DxINM1GyMMKw3dcf/n8evuAqHRhjqWxiYsKQtHyhMIIBwnVylyE0Fw== X-Received: by 2002:ae9:e30b:: with SMTP id v11mr65965130qkf.434.1577924316254; Wed, 01 Jan 2020 16:18:36 -0800 (PST) Received: from OFFICE (remote.mahercos.com. [70.109.60.226]) by smtp.gmail.com with ESMTPSA id t7sm14613563qkm.136.2020.01.01.16.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jan 2020 16:18:35 -0800 (PST) From: "Shahzad Ahmad" To: "'David G. Johnston'" , "'PostgreSQL mailing lists'" References: <16181-3b69f6cdd6047372@postgresql.org> In-Reply-To: Subject: RE: BUG #16181: Error Creating Stored Procedures Date: Wed, 1 Jan 2020 19:18:32 -0500 Message-ID: <002901d5c102$2abfb5c0$803f2140$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002A_01D5C0D8.41EA22F0" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLU23bh82n8MoRzOsyAgi7EvHN24gHZu23Fpcl7mGA= Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_002A_01D5C0D8.41EA22F0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable David,=20 Thanks for the quick reply.=20 It is working with BEGIN and END.=20 The code was generated by pgAdmin4 GUI and I somehow incorrectly assumed = that GUI would include BEGIN and END statements.=20 =20 Thanks for your help. Shahzad=20 =20 From: David G. Johnston =20 Sent: Wednesday, January 1, 2020 7:02 PM To: shahzadahmad00@gmail.com; PostgreSQL mailing lists = Subject: Re: BUG #16181: Error Creating Stored Procedures =20 On Wed, Jan 1, 2020 at 4:43 PM PG Bug reporting form = > wrote: The following bug has been logged on the website: Bug reference: 16181 Logged by: Shahzad Ahmad Email address: shahzadahmad00@gmail.com = =20 PostgreSQL version: 12.1 Operating system: Ubuntu 18.04.3 LTS Description: =20 I tried both pgAdmin GUI and psql using a script file. In both instances = i got the same error.=20 CREATE OR REPLACE PROCEDURE admin.my_test(IN role_id integer DEFAULT 0) LANGUAGE 'plpgsql' =20 Not a bug...the documentation shows how to write a pl/pgsql = function/stored procedure. =20 https://www.postgresql.org/docs/12/plpgsql-structure.html =20 Note the "BEGIN" and "END" portions of that syntax diagram are not = optional. =20 David J. ------=_NextPart_000_002A_01D5C0D8.41EA22F0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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 PM
To: = 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:      16181
Logged by:      =     Shahzad Ahmad
Email address:      shahzadahmad00@gmail.com
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.

 

 

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

 

David = J.

------=_NextPart_000_002A_01D5C0D8.41EA22F0--