3 ms·
Not sure how this integrates with Go's database drivers but from the Postgres side: 1. NULLIF(the_uuid, '0000-000000-00000-0000') https://www.postgresql.org/d
by gnosek 7y ago
Not sure how this integrates with Go's database drivers but from the Postgres side:
1. NULLIF(the_uuid, '0000-000000-00000-0000')
https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-NULLIF https://www.postgresql.org/docs/current/functions-conditiona...
2. on insert/update rules to rewrite the uuid (probably using NULLIF)
https://www.postgresql.org/docs/current/sql-createrule.html https://www.postgresql.org/docs/current/sql-createrule.html