# Calling a PostgreSQL stored procedure in a transaction group fails

**URL:** <https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158>\
**Category:** Ignition\
**Created:** [January 30, 2023, 4:06pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158 "2023-01-30T16:06:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [January 30, 2023, 4:06pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/1 "2023-01-30T16:06:15Z")

</div>

I have a transaction group that is calling a PostrgreSQL stored procedure that is getting an error message:  
`Error during group execution. Error registering parameter 'datetime'. Verify that the parameter name and type are correct. Method org.postgresql.jdbc.PgCallableStatement.setObject(String,Object,int) is not yet implemented.`  
The definition of the stored procedure:  
`
create or replace procedure sp_record_kpi (
serialNo int
, kpiId int
, dateTime timestamptz
, sampleValue float
) `

I've modified the translator to use timestamptz for the the Datetime mapping.  
When I call the stored procedure in python (using runPrepUpdate), the call works flawlessly. Any help would be greatly appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 30, 2023, 4:43pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/2 "2023-01-30T16:43:36Z")

</div>

Your column name has a capital "T", probably to avoid clashing with the reserved word "datetime". If you use anything but lower case in PostgreSQL identifiers (table names, column names, schema names, etc.), you must quote the name with double quotes.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 30, 2023, 5:16pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/3 "2023-01-30T17:16:17Z")

</div>

> [@naturesbeast](#):
>
> Method org.postgresql.jdbc.PgCallableStatement.setObject(String,Object,int) is not yet implemented.

Huh. I don't really understand how Postgres' driver works at all, to be honest.  
`PgCallableStatement` throws the 'not yet implemented' error for any of the 'setX' methods:

> <https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgCallableStatement.java#L762>

But that's how they say to use it in their documentation:  
[https://jdbc.postgresql.org/documentation/callproc/](https://jdbc.postgresql.org/documentation/callproc/)

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [January 30, 2023, 5:16pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/4 "2023-01-30T17:16:28Z")

</div>

It doesn't really seem to matter what I do, I'm receiving that same message. I created a test procedure:  
`
create or replace procedure sp_test (
string_data varchar(255)
)
as $$
begin
return;
end; $$
language plpgsql;
`  
and get the same error when the transaction group executes

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [January 30, 2023, 5:17pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/5 "2023-01-30T17:17:09Z")

</div>

That's exactly what I'm finding during my tests.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 30, 2023, 5:20pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/6 "2023-01-30T17:20:32Z")

</div>

Try using parameter numbers instead of names.

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [January 30, 2023, 5:25pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/7 "2023-01-30T17:25:13Z")

</div>

Do you mean this?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a51b48381d030e85f3cdc7de0aa52286885f159a.png)

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [February 1, 2023, 2:19pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/8 "2023-02-01T14:19:11Z")

</div>

After about an hour on the phone with tech support, I was told that there's a known bug with executing a stored procedure with named parameters in Postgresql from a transaction group. The developers are unable to fix the issue. Ugh.

---

<div class="post-metadata">

**Author:** ![illank86](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@illank86](https://forum.inductiveautomation.com/u/illank86)\
**Post date:** [October 26, 2025, 1:33am UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/9 "2025-10-26T01:33:08Z")

</div>

i still have this problem in ignition 8.1.50.. is there any solution ?

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [November 24, 2025, 2:54pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/10 "2025-11-24T14:54:36Z")

</div>

I opened a ticket and was told that there were no plans to add support for stored procedures in 8.1. Maybe it’s available in 8.3? I ended up creating triggers to do the work. Not ideal.

–steve

---

<div class="post-metadata">

**Author:** ![piege](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@piege](https://forum.inductiveautomation.com/u/piege)\
**Post date:** [February 25, 2026, 9:18pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/11 "2026-02-25T21:18:07Z")

</div>

I saw this statement from another forum:  
”Unfortunately, using the parameter names is not a feature supported by the implementation of the JDBC 4 driver for the PostgreSQL database.

However, you can still continue to use an integer (variable or literal) to indicate the position of the parameter.”

So, if you have the following SP,

CREATE FUNCTION sample(  
VARCHAR(50),  
TIMESTAMP  
)

you’d want to reference to VARCHAR(50) as 1

and timestamp as 2 in the Designer.

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [February 26, 2026, 2:27pm UTC](https://forum.inductiveautomation.com/t/calling-a-postgresql-stored-procedure-in-a-transaction-group-fails/69158/12 "2026-02-26T14:27:39Z")

</div>

Thanks piege. I will keep this in mind next time I try to execute stored procedures against a PostgreSQL database.
