How can you get the ID of the last inserted row using psycopg2 on a Greenplum database?
Here are several things I've tried already that don't work.
- RETURNING isn't supported by Greenplum.
- psycopg2's cursor.lastrowid always returns 0.
- SELECT nextval() gives me the next row id, but also increments the counter so the actual inserted row uses a different id.
- SELECT currval() isn't supported.
Thanks in advance.