Re: Need help with clarification on stored procedure support in PostGreSQL database

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Guyren Howe <guyren(at)gmail(dot)com>, raf <raf(at)raf(dot)org>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "Bysani, Ram" <rbysani(at)informatica(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Need help with clarification on stored procedure support in PostGreSQL database
Date: 2021-03-09 22:16:11
Message-ID: CAKFQuwZVbMym9OUqcb8b_soGg3e4+XGHkvKoL-AsH7N42CeKUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 9, 2021 at 1:57 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Mon, Mar 8, 2021 at 9:41 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Guyren Howe <guyren(at)gmail(dot)com> writes:
> >>> This seems like an important consideration. I've spent 10 minutes
> >>> searching the documentation for PG 11 and can't find where it is
> >>> documented. Perhaps it should be made more prominent?
>
> >> https://www.postgresql.org/docs/current/xproc.html
>
> > CREATE FUNCTION links into 37.3 but CREATE PROCEDURE doesn't link into
> 37.4
> > Even if this may not be sufficient it seems reasonable to at least remain
> > consistent. I suspect most people start at CREATE, not "Server
> > Programming".
>
> Yeah, fair point, and it also seems like we ought to give those links
> more prominence. In the attached proposed patch, I put them into the
> introductory section of the reference pages. I also failed to resist
> the temptation to do some wordsmithing in 38.4 ...
>
>
Thanks. Some observations.

The omission of the "OUT" parameter mode seems intentional since at present
our procedures do not support OUT mode parameters.

Instead of "The difference" or "One difference" I would suggest: "However,
a procedure does not return a value, so there is no return type
declaration; though a procedure can declare INOUT (but not plain OUT)
parameters."

Relocating the links to the description instead of usage is good. The
additional procedure link after the examples seems redundant, particularly
as the linked to location doesn't actually have more examples. The
"...further information on writing" doesn't really match up with reality
either. It is more "...further information on incorporating
functions/procedures into applications."

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-03-09 22:21:49 Re: Need help with clarification on stored procedure support in PostGreSQL database
Previous Message Rob Sargent 2021-03-09 21:32:20 Re: unexpected character used as group separator by to_char