Complex formatting problem
ptman opened this issue · comments
Paul Tötterman commented
Let's call this an INSELECT (instead of UPSERT):
WITH i AS (
INSERT INTO users (email)
VALUES ($1)
ON CONFLICT
DO NOTHING
RETURNING
*)
SELECT
*
FROM
i
UNION
SELECT
*
FROM
users
WHERE
email = $1