I am trying to retrieve the ID value of an inserted row using node.js' pg module. The query is:
INSERT INTO "MySchema"."USER_ACCOUNT"
("LANG","NAME","EMAIL","EMAIL_CONF","STATUS","STATUS_UPDATE","CREATION","PREFERENCES")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8)
RETURNING USER_ACCOUNT_ID_seq;
But I get the following error message:
Cannot insert user account { [error: column "user_account_id_seq" does not exist]...
I don't provide an id, because I am letting the database set the next sequence value.
How can I retrieve this ID value after the insert? Thanks!