Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I think the issue maybe Npgsql doesn't like the DO anonymous code as when I look at it as it errors its converted all the parameters to values but not the anonymous code Commented Sep 17, 2014 at 16:32
  • I can't really as I'd need to say in the code is this postgres or mssql, if so call the function etc etc :( Commented Sep 17, 2014 at 16:36
  • Unrelated but: WHERE Id = currval('mytable_id_seq') is enough. No need for a select there. Commented Sep 17, 2014 at 17:54
  • This question has several solutions to the "insert or update" problem: stackoverflow.com/q/1109061/330315 Commented Sep 17, 2014 at 17:56