[FEATURE-10121] Postgres RETURNING on named query

I am trying to set up some insert postgres db queries in named queries that I had in system.db.runPrepUpdate previously, but I am having issues getting the pkey to return when I do an insert statement. the only thing getting returned is a “1”. If I add RETURNING id to the query, I get the following error:


Here is the query I am using:

Any help is appreciated, thanks!

We have a ticket to add that in to named queries. I’ll link your post to the ticket, which will help it get more attention.

Is there any workaround currently?
Can I use a system.db.runPrepUpdate on a Perspective event script?

Yes, you can run system.db. functions from scripts in Perspective.

1 Like

Alright I will stick with that. Thanks @PGriffith and @KathyApplebaum

This feature was added in the 8.0.3 nightly build that was uploaded today (6/10).

2 Likes