# \[BUG\] Postgre getKey error returning uuid key

**URL:** <https://forum.inductiveautomation.com/t/bug-postgre-getkey-error-returning-uuid-key/79458>\
**Category:** Ignition\
**Created:** [September 21, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/bug-postgre-getkey-error-returning-uuid-key/79458 "2023-09-21T15:21:54Z")\
**Posts on this page:** 1\
**Showing post:** 18

<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:** [February 12, 2024, 7:48pm UTC](https://forum.inductiveautomation.com/t/bug-postgre-getkey-error-returning-uuid-key/79458/18 "2024-02-12T19:48:18Z")

</div>

> [@paul-griffith](#):
>
> Update queries returning a plain `int` is baked into the JDBC spec

Well, not really, or not any more, as it turns out.

> [@paul-griffith](#):
>
> none of the exposed Ignition query machinery will help

But this is true. However, an alternative for the OP using UUIDs in PostgreSQL is now available (of no help with UUIDs in MS SQL Server, unfortunately).

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/89):
>
> Automation Professionals is pleased to announce a new release of the Integration Toolkit module. This release adds one new scripting function, [system.db.runPrepInsert()](https://www.automation-pros.com/toolkit/doc/utility.html#runprepinsert). It is very similar to IA's [system.db.runPrepUpdate()](https://docs.inductiveautomation.com/display/DOC81/system.db.runPrepUpdate), intepreting the query, args, database, and tx arguments in the same fashion. The getKey argument is omitted as moot, as this function always retrieves generated keys. The skipAudit optional argument is unimplemented. For Ignition v8.1+: [v2.0.15.240431913](https://www.automation-pros.com/ignition/Integration%20Toolkit-2.0.15.240431913-v81.modl) Do note the docu…

---

_[View the full topic](https://forum.inductiveautomation.com/t/bug-postgre-getkey-error-returning-uuid-key/79458)._
