| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Mark <nvpostgres(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Debugging --- ERROR: function does not exist |
| Date: | 2026-10-26 16:06:11 |
| Message-ID: | 50099a66-4db9-49af-b6ee-fad5f0ebdca4@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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."
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manu | 2026-10-26 17:46:22 | Re: Regarding huge logical slot lag between source and target |
| Previous Message | Mark | 2026-10-26 15:26:13 | Re: Debugging --- ERROR: function does not exist |