generatedKey in Postgres

I have an app that runs fine with Lucee & MariaDB but I need it to run with PostgreSQL also. The current issue is when inserting records into the DB the generatedKey field is coming back with the ID and all of the inserted values.


INSERT INTO table ( username ) VALUES ( 'bsmith' );
generatedKey = "3,bsmith"

Don’t forget to tell us about your stack!

OS: Arch Linux
Java Version: OpenJDK 11.0.6
Jetty Version: 9.4.26.v20200117
Lucee Version:

if u can use sql-dialect for postgres u can use:

<cfquery name="q">
INSERT INTO table ( username ) VALUES ( 'bsmith' )

last id is in var

1 Like