On 10/26/26 8:26 AM, Mark wrote:

    Given that OUT is basically an alternate form of RETURNS why do you
    want
    to supply the OUT values to the function/procedure SELECT/CALL in the
    first place?

    That would be something the function/procedure does internally using
    the
    IN values, where IN is either explicitly stated or implied by a lack of
    an IN/OUT/INOUT declaration.


Honestly I don't know at the moment, guess it is a stylistic choice, along with the choice to use a PROCEDURE vs a FUNCTION (which I do not know that much about, other than what I have learned in this thread)

Which is only part of the story. For a more complete picture see:

https://www.postgresql.org/docs/current/xproc.html


I guess with the RETURNS it make the DECLARE section cleaner and with the PROCEDURE it make the body of the code cleaner

Well the important part from link above is:

"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."






Reply via email to