Created
July 19, 2014 22:13
-
-
Save xivSolutions/50f4944acc3399133dd9 to your computer and use it in GitHub Desktop.
PG - Include inserted ID in JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO "ClientDocuments" ("ClientDocumentId", body) VALUES (nextval('"ClientDocuments_ClientDocumentId_seq"'::regclass), cast('{"id":"' || lastval() || '", "name":"John"}' as json)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment