summaryrefslogtreecommitdiff
path: root/src/db/rest/post/api_post_insert.sql
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/db/rest/post/api_post_insert.sql (renamed from db/rest/post/api_post_insert.sql)4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/rest/post/api_post_insert.sql b/src/db/rest/post/api_post_insert.sql
index 8b2eb48..e0594dc 100644
--- a/db/rest/post/api_post_insert.sql
+++ b/src/db/rest/post/api_post_insert.sql
@@ -22,7 +22,9 @@ BEGIN
) VALUES (
_user_id,
NEW.content
- );
+ )
+ RETURNING id
+ INTO NEW.id;
RETURN NEW;
END