Skip to content

Commit

Permalink
Merge pull request #330 from guiguid/patch-1
Browse files Browse the repository at this point in the history
Remove obsolete comment.
  • Loading branch information
lovasoa authored May 22, 2024
2 parents ed78380 + 6757add commit 556d61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/user-authentication/create_user.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
INSERT INTO user_info (username, password_hash)
VALUES (:username, sqlpage.hash_password(:password))
ON CONFLICT (username) DO NOTHING -- this syntax is PostgreSQL-specific. In SQLite, use ON CONFLICT IGNORE.
ON CONFLICT (username) DO NOTHING
RETURNING
'redirect' AS component,
'create_user_welcome_message.sql?username=' || :username AS link;

-- If we are still here, it means that the user was not created
-- because the username was already taken.
SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link;
SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link;

0 comments on commit 556d61a

Please sign in to comment.