Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJU2X-00063T-37 for pgsql-general@arkaria.postgresql.org; Tue, 09 Mar 2021 04:32:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJU2V-0002L1-Su for pgsql-general@arkaria.postgresql.org; Tue, 09 Mar 2021 04:32:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJU2V-0002Ku-Iq for pgsql-general@lists.postgresql.org; Tue, 09 Mar 2021 04:32:11 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lJU2S-0004Ox-SJ for pgsql-general@lists.postgresql.org; Tue, 09 Mar 2021 04:32:10 +0000 Received: by mail-pj1-x102f.google.com with SMTP id t9so192985pjl.5 for ; Mon, 08 Mar 2021 20:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version; bh=CxkekieOTyXP5KccvkTtiENgoCMqrcLzEP3KJ9eLwMU=; b=V94REAU3nfjryEhwRZ8J9OHCs4QU6iPLNbF81JalYq2vXDw+EIsR/XFxwF+J89ouYh HFD9Z0y7ce6kdkcn2E9nmmkBI3sSdu26o3WQCbYWRdQi9US+6PFjwPqQOkGHhM+5U0Pr Si8LU+6OJ83nYkfkuA6pHgVTyqakvrMrWqJ++JRZKBwXsTcj5i4u5eb+vpRlM/8A59+q XZU8oBK1NrAco8HV5eHxVOs/OooIWImqMDJn0lpaMjQr/15PQKetAXMo6dr2z4JK1TmI FRrOWMv5qnjQV2mqZ2Gs0uwbl3xfiM6YYYfN4dA5X/kKF6WAEM9jAJUNPvH48voMcdBP QKjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version; bh=CxkekieOTyXP5KccvkTtiENgoCMqrcLzEP3KJ9eLwMU=; b=ASQ2g8lAaKIxih3XF8abbCAs8UMW98uACZ/bH1N2KRCiGaYfq5rcvTXHpYNwh2dTAr EFLaH9AqFqFY6BFNNieeo9P5f41S9tuHfxpJUoTesMEKaBhS2t6CkADtLtenmsESMi9C 9u0gKQJwcVvyrAY7mf4Z+L7yTfHQcNbPk5fYb4WTqAd7ZqbF36X1s2joXEnlrKlEEJrP ZkXlvUwzVCiEgOuUSXARewHoBIUKSQ9aWv4WjZBNUyFmEx4BQnwyPxWhx7uQySmquVlT 1a0hVwbRvNQl8V0WEDDmgTVXuil390JqcfUVuljNofI29jHHuVXwp8CMmUtYPQOolWE2 Z1og== X-Gm-Message-State: AOAM5306B5WzmZYYseGdEZ90Pe+FVYXVYi5xvH46KbZydELph6pe0Wax vghlPCgdFLnuvNnJIDQp1WE= X-Google-Smtp-Source: ABdhPJwGda+MDXY0yHn0bAAQY00rnRmR6IP8h3Dbvzgc4sADLglWQjAFrc2r9bUy7sZDLBwsU8n7qQ== X-Received: by 2002:a17:902:9783:b029:e5:bfa2:dc24 with SMTP id q3-20020a1709029783b02900e5bfa2dc24mr24187123plp.70.1615264327527; Mon, 08 Mar 2021 20:32:07 -0800 (PST) Received: from [2600:8801:8800:11:706f:d486:200:0] ([2600:8801:8800:11::f]) by smtp.gmail.com with ESMTPSA id u15sm11325132pfk.128.2021.03.08.20.32.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Mar 2021 20:32:07 -0800 (PST) Date: Mon, 8 Mar 2021 20:31:53 -0800 From: Guyren Howe To: Tom Lane , raf Cc: Adrian Klaver , =?utf-8?Q?Bysani=2C_Ram?= , "=?utf-8?Q?pgsql-general=40lists.postgresql.org?=" Message-ID: In-Reply-To: <20210309005300.gdp2kjoy6bjwynaa@raf.org> References: <29836c19-5321-7093-bc88-a82c6a497a36@aklaver.com> <20210308222228.gljiuauwdd4p3kxs@raf.org> <1932630.1615246316@sss.pgh.pa.us> <20210309005300.gdp2kjoy6bjwynaa@raf.org> Subject: Re: Need help with clarification on stored procedure support in PostGreSQL database X-Readdle-Message-ID: af8a3c82-a207-437c-a8ed-9014cb7428f1@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="6046fa42_19495cff_1c8d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --6046fa42_19495cff_1c8d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This seems like an important consideration. I=E2=80=99ve spent 10 minutes= searching the documentation for PG 11 and can=E2=80=99t find where it is= documented. Perhaps it should be made more prominent=3F On Mar 8, 2021, 16:53 -0800, raf , wrote: > On Mon, Mar 08, 2021 at 06:31:56PM -0500, Tom Lane wrote: > > > raf writes: > > > Is there any important different between a stored procedure and > > > a stored function that returns void=3F I've been using functions > > > for everything but calling them procedures in my head (even though > > > most of them do return a value or result set). > > > > A procedure can commit or rollback a transaction (and then start > > a new one). > > > > regards, tom lane > > thanks. > > cheers, > raf > > > --6046fa42_19495cff_1c8d Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
This seems like an important consideration. I=E2=80= =99ve spent 10 minutes searching the documentation for PG 11 and can=E2=80= =99t find where it is documented. Perhaps it should be made more prominen= t=3F
On Mar 8, 2021, 16:53 -0800, raf &l= t;raf=40raf.org>, wrote:
On Mon, Mar 08, 2021 at 06:31:56PM -0500, Tom Lane <tgl=40ss= s.pgh.pa.us> wrote:

raf <raf=40raf.org> writes:
Is there any important different between a = stored procedure and
a stored function that returns void=3F I've been using functions
for everything but calling them procedures in my head (even though
most of them do return a value or result set).

A procedure can commit or rollback a transaction (and then start
a new one).

regards, tom lane

thanks.

cheers,
raf



--6046fa42_19495cff_1c8d--