Re: retrieving results of procedures with OUT params

2024-09-07 Thread David G. Johnston
On Sat, Sep 7, 2024, 11:56 ch.l.ngre wrote: > > > > You are right, the documentation for CALL states that a row is being > returned. > However if you read > https://www.postgresql.org/docs/current/xproc.html#XPROC > 'Procedures do not return a function value; hen

Re: retrieving results of procedures with OUT params

2024-09-07 Thread ch.l.ngre
t/xproc.html#XPROC 'Procedures do not return a function value; hence CREATE PROCEDURE lacks a RETURNS clause. However, procedures can instead return data to their callers via output parameters' this does not sound like a row being returned. Also plpgsql does not do it when you invoke CALL. The

Re: retrieving results of procedures with OUT params

2024-09-07 Thread David G. Johnston
On Monday, September 2, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/libpq-exec.html > Description: > > https://www.postgresql.org/docs/16/libpq-exec.html#LIBPQ-PQRESULTSTATUS > Existing text:

retrieving results of procedures with OUT params

2024-09-03 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/libpq-exec.html Description: https://www.postgresql.org/docs/16/libpq-exec.html#LIBPQ-PQRESULTSTATUS Existing text: If the result status is PGRES_TUPLES_OK, PGRES_SINGLE_TUPLE, or PGRES_TU

Re: Functions should be Functions & Procedures

2020-12-23 Thread Bruce Momjian
On Wed, Nov 25, 2020 at 06:38:56PM +, Daniel Westermann (DWE) wrote: > >On Wed, Nov 25, 2020 at 06:23:44PM +, Daniel Westermann (DWE) wrote: > >> >Good point.  It seems PL/pgSQL, PL/Perl, PL/Python, PL/Tcl, and SPI > >> >server-side languages all support pro

Re: Functions should be Functions & Procedures

2020-11-25 Thread Daniel Westermann (DWE)
>> >> Page: https://www.postgresql.org/docs/13/plpgsql-overview.html >> >> Description: >> >> >> >> Hi, >> >> >> >> since PostgreSQL 11 we have procedures, so referencing to only functions >> >> here seems to igno

Re: Functions should be Functions & Procedures

2020-11-25 Thread Bruce Momjian
ps://www.postgresql.org/docs/13/plpgsql-overview.html > >> Description: > >> > >> Hi, > >> > >> since PostgreSQL 11 we have procedures, so referencing to only functions > >> here seems to ignore that. Shouldn't procedures be mentioned here

Re: Functions should be Functions & Procedures

2020-11-25 Thread Daniel Westermann (DWE)
Hi Bruce, >On Tue, Nov 24, 2020 at 07:15:29PM +, PG Doc comments form wrote: >> The following documentation comment has been logged on the website: >> >> Page: https://www.postgresql.org/docs/13/plpgsql-overview.html >> Description: >> >> Hi, >&g

Re: Functions should be Functions & Procedures

2020-11-25 Thread Bruce Momjian
On Tue, Nov 24, 2020 at 07:15:29PM +, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/13/plpgsql-overview.html > Description: > > Hi, > > since PostgreSQL 11 we have proce

Functions should be Functions & Procedures

2020-11-24 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/plpgsql-overview.html Description: Hi, since PostgreSQL 11 we have procedures, so referencing to only functions here seems to ignore that. Shouldn't procedures be mentioned here as

Re: Procedures

2020-08-31 Thread Bruce Momjian
On Tue, Aug 25, 2020 at 03:03:13PM -0400, Bruce Momjian wrote: > On Tue, Aug 25, 2020 at 08:38:11PM +0200, Peter Eisentraut wrote: > > On 2020-08-24 18:00, Bruce Momjian wrote: > > > -command, a procedure is called explicitly using > > > -the statement. > > > +command, a procedure is c

Re: Procedures

2020-08-25 Thread Bruce Momjian
On Tue, Aug 25, 2020 at 08:38:11PM +0200, Peter Eisentraut wrote: > On 2020-08-24 18:00, Bruce Momjian wrote: > > -command, a procedure is called explicitly using > > -the statement. > > +command, a procedure is called in isolation using > > +the command. If the CALL command is n

Re: Procedures

2020-08-25 Thread Peter Eisentraut
On 2020-08-24 18:00, Bruce Momjian wrote: -command, a procedure is called explicitly using -the statement. +command, a procedure is called in isolation using +the command. If the CALL command is not +part of an explicit transaction, a procedure can commit, rollback, +an

Re: Procedures

2020-08-24 Thread David G. Johnston
On Mon, Aug 24, 2020 at 9:09 AM Pavel Stehule wrote: > > > po 24. 8. 2020 v 18:00 odesílatel Bruce Momjian napsal: > >> On Mon, Aug 24, 2020 at 05:51:29PM +0200, Pavel Stehule wrote: >> > sure. Maybe enhancing about sentence like "it is not possible in a >> function." >> > >> > and >> > >> > "a

Re: Procedures

2020-08-24 Thread Pavel Stehule
po 24. 8. 2020 v 18:00 odesílatel Bruce Momjian napsal: > On Mon, Aug 24, 2020 at 05:51:29PM +0200, Pavel Stehule wrote: > > sure. Maybe enhancing about sentence like "it is not possible in a > function." > > > > and > > > > "a procedure can commit (or rollback) and begin new transactions during

Re: Procedures

2020-08-24 Thread Bruce Momjian
On Mon, Aug 24, 2020 at 05:51:29PM +0200, Pavel Stehule wrote: > sure. Maybe enhancing about sentence like "it is not possible in a function." > > and > > "a procedure can commit (or rollback) and begin new transactions during its >         execution" OK, updated patch. -- Bruce Momjian

Re: Procedures

2020-08-24 Thread Pavel Stehule
its > > > > > execution. > > > > > > > > OK, how is this updated patch? > > > > > > > > > > > > Looks good. I felt "begin and commit" was a bit wordy but it > works. > >

Re: Procedures

2020-08-24 Thread Bruce Momjian
> > > > Looks good.  I felt "begin and commit" was a bit wordy but it works. > > > > So, I was worried that "manage multiple transactions" could imply > > something like savepoints, which can be managed by functions.  It is >

Re: Procedures

2020-08-24 Thread Bruce Momjian
ns" could imply > something like savepoints, which can be managed by functions.  It is > really the top-level begin/commit that is unique for procedures. > > Functions is executed under outer transaction every time - rollback to save > point hasn't impact on

Re: Procedures

2020-08-24 Thread Pavel Stehule
t; > Looks good. I felt "begin and commit" was a bit wordy but it works. > > So, I was worried that "manage multiple transactions" could imply > something like savepoints, which can be managed by functions. It is > really the top-level begin/commit that is unique f

Re: Procedures

2020-08-24 Thread Bruce Momjian
multiple transactions" could imply something like savepoints, which can be managed by functions. It is really the top-level begin/commit that is unique for procedures. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee

Re: Procedures

2020-08-22 Thread David G. Johnston
On Sat, Aug 22, 2020 at 10:14 AM Bruce Momjian wrote: > On Fri, Aug 21, 2020 at 07:42:35PM -0700, David G. Johnston wrote: > > > [...] the CALL command. If the CALL command is not part of an explicit > > transaction a procedure can also manage multiple transactions during its > > execution. > >

Re: Procedures

2020-08-22 Thread Bruce Momjian
On Fri, Aug 21, 2020 at 07:42:35PM -0700, David G. Johnston wrote: > On Fri, Aug 21, 2020 at 3:52 PM Bruce Momjian wrote: > > > > Agreed, this doc area needs help. > > I developed the attached patach for this.  Is this sufficient? > > > For consistency I would change "statement" to "c

Re: Procedures

2020-08-22 Thread Bruce Momjian
ation content to this > > " ... prior to PostgreSQL 11, these functions were unable to manage their > own transactions. PostgreSQL 11 adds SQL procedures that can perform full > transaction management within the body of a function, enabling developers > to crea

Re: Procedures

2020-08-22 Thread David G. Johnston
g some language with a similar > information content to this > >> " ... prior to PostgreSQL 11, these functions were unable to manage their >> own transactions. PostgreSQL 11 adds SQL procedures that can perform full >> transaction management within the body of a function,

Re: Procedures

2020-08-22 Thread Jürgen Purtz
t to this " ... prior to PostgreSQL 11, these functions were unable to manage their own transactions. PostgreSQL 11 adds SQL procedures that can perform full transaction management within the body of a function, enabling developers to create more advanced server-side applications

Re: Procedures

2020-08-22 Thread Robin Abbi
able to manage their > own transactions. PostgreSQL 11 adds SQL procedures that can perform full > transaction management within the body of a function, enabling developers > to create more advanced server-side applications, such as ones involving > incremental bulk data l

Re: Procedures

2020-08-21 Thread David G. Johnston
On Fri, Aug 21, 2020 at 3:52 PM Bruce Momjian wrote: > > > Agreed, this doc area needs help. > > I developed the attached patach for this. Is this sufficient? > For consistency I would change "statement" to "command" at the end of that paragraph . the command. and to contrast with "a p

Re: Procedures

2020-08-21 Thread Bruce Momjian
On Thu, Aug 6, 2020 at 06:10:52PM -0400, Bruce Momjian wrote: > On Thu, Aug 6, 2020 at 02:30:55PM +0100, Robin Abbi wrote: > > PostgreSQL went as far as release 10 without procedures. > > Some third party resources written before 11 loosely conflate procedures > > with &g

Re: Procedures

2020-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2020 at 02:30:55PM +0100, Robin Abbi wrote: > PostgreSQL went as far as release 10 without procedures. > Some third party resources written before 11 loosely conflate procedures with > functions. > Some third party resources written before 11 accurately state Po

Re: Procedures

2020-08-06 Thread Robin Abbi
PostgreSQL went as far as release 10 without procedures. Some third party resources written before 11 loosely conflate procedures with functions. Some third party resources written before 11 accurately state PostgreSQL has functions but not procedures. Referring to the PostgreSQL docs for 11 on

Re: Procedures

2020-08-06 Thread Dave Cramer
t; Description: > > > > The information on procedures could helpfully include that the feature is > > new from PostgreSQL 11 and give an explanation of how it differs from > > functions. I found the information I needed here > > https://dba.stackexchange.com/a/262662

Re: Procedures

2020-08-05 Thread Bruce Momjian
On Tue, Aug 4, 2020 at 10:33:49AM +, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/11/sql-createprocedure.html > Description: > > The information on procedures could helpfull

Procedures

2020-08-04 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/11/sql-createprocedure.html Description: The information on procedures could helpfully include that the feature is new from PostgreSQL 11 and give an explanation of how it differs from

Re: Wrong 'Special local variables PG_' prefix in 'Trigger procedures' section

2018-03-20 Thread Tom Lane
=?utf-8?q?PG_Doc_comments_form?= writes: > Page: https://www.postgresql.org/docs/10/static/plpgsql-trigger.html > The documentation (10 and 9.6) contains a typo when mentioning 'Special > local variables PG_something'. Instead it should be 'Special local variables > TG_something' as it is for tri

Wrong 'Special local variables PG_' prefix in 'Trigger procedures' section

2018-03-20 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/static/plpgsql-trigger.html Description: The documentation (10 and 9.6) contains a typo when mentioning 'Special local variables PG_something'. Instead it should be 'Special local variable