It would possible also to use INSERT INTO ... RETURNING
as described in DbLinq issue tracker. This does not require extra statement execution and does not assume that currval() returns next number. Andrus. ----- Original Message ----- From: Sami M. Kallio To: [email protected] Sent: Saturday, July 18, 2009 5:38 AM Subject: [dblinq] Re: Using SERIAL (auto increment) in PostgreSQL? I got it working by hacking the provider: class PgsqlSqlProvider : SqlProvider { public override SqlStatement GetInsertIds(IList<SqlStatement> outputParameters, IList<SqlStatement> outputExpressions) { ... ids.Add(outputExpression.Replace("nextval", "currval", true)); ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
