RE: [EXTERNAL] Calling stored procedures and functions

From: Hanefi Onaldi <Hanefi(dot)Onaldi(at)microsoft(dot)com>
To: Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: RE: [EXTERNAL] Calling stored procedures and functions
Date: 2021-03-30 08:32:22
Message-ID: DM6PR21MB149725F06D86C7CC3B7C7746E37D9@DM6PR21MB1497.namprd21.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Simon,

I think you need to read more on the differences between PostgreSQL functions and procedures. I suggest you use CALL to execute your procedure, instead of a SELECT.

You can also change the procedure into a function and that will also work.

The syntax is:
CALL proc(...)
or
SELECT func(...)

See https://www.postgresql.org/docs/current/sql-call.html for more info.

-----Original Message-----
From: Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com>
Sent: 30 Mart 2021 Salı 11:23
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: [EXTERNAL] Calling stored procedures and functions

Hi,

I'm really sorry to ask so many questions in such a short period of time but I'm having some issues with getting things to work and Google isn't working too well for me at the moment. At least I am doing what Google tells me but it still isn't working. Anyway, my code is here (along with the error message):

https://gist.github.com/simonconnah/4ea902ca9830caafd3901dea0f84b49f

If anyone could shed some light on why calling this stored procedure isn't working I would really appreciate it.

Thank you.

Simon.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Simon Connah 2021-03-30 08:46:58 RE: [EXTERNAL] Calling stored procedures and functions
Previous Message Simon Connah 2021-03-30 08:23:05 Calling stored procedures and functions