diff options
Diffstat (limited to 'sql/Pg-upgrade-2.6.18-2.6.19.sql')
-rw-r--r-- | sql/Pg-upgrade-2.6.18-2.6.19.sql | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/Pg-upgrade-2.6.18-2.6.19.sql b/sql/Pg-upgrade-2.6.18-2.6.19.sql index ce34ab29..924bd0ba 100644 --- a/sql/Pg-upgrade-2.6.18-2.6.19.sql +++ b/sql/Pg-upgrade-2.6.18-2.6.19.sql @@ -195,10 +195,10 @@ COMMIT; CREATE FUNCTION create_user(text) RETURNS int4 AS $$ INSERT INTO users(username) VALUES ('$1'); - SELECT 1; + SELECT currval('user_id_seq'); $$ LANGUAGE 'SQL'; -COMMENT ON FUNCTION create_user(text) IS $$ Function to create user Returns 1 if successful, else it is an error. $$; +COMMENT ON FUNCTION create_user(text) IS $$ Function to create user Returns users.id if successful, else it is an error. $$; CREATE FUNCTION update_user(int4,text) RETURNS int4 AS $$ UPDATE users SET username = '$2' WHERE id = $1; |