haskell-relational-record icon indicating copy to clipboard operation
haskell-relational-record copied to clipboard

"returning id" with postgresql

Open carlosdagos opened this issue 8 years ago • 2 comments

Hello again,

For inserts with auto increment primary keys [1], how can get the ID of a new row inserted?

Having a hard time finding it in the documentation and source code.

Thanks.

[1] http://www.postgresql.org/docs/9.1/static/sql-insert.html

carlosdagos avatar Apr 25 '16 21:04 carlosdagos

bump

mgmeier avatar Nov 08 '16 14:11 mgmeier

@khibino doesn't plan to add non-SQL-standard features to HRR to keep it easy to maintain portability. So I guess this feature would also be rejected. You have to use some unsafe* APIs to implement such features. (Sorry, I can't answer which API is suitable for your need)

igrep avatar Nov 09 '16 06:11 igrep