Hacker News new | ask | show | jobs
by gnosek 2326 days 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-conditiona...

2. on insert/update rules to rewrite the uuid (probably using NULLIF)

https://www.postgresql.org/docs/current/sql-createrule.html