[Interest] Postgresql RETURNING clause.... possible to get it?

Guido Seifert wargand at gmx.de
Mon Feb 16 14:15:08 CET 2015


Hiya,
I have a sql (postgres) statement:

> INSERT INTO rooms (coordinate) VALUES (ST_SetSRID(ST_MakePoint(:lon, :lat), 4326)) returning id;

with id being a serial.

Sure, I can get the id with lastInsertId(), but I wonder, if and how it is possible to get the id value
from a QSqlQuery.

Guido



More information about the Interest mailing list