4 ms·
You can write a custom data type in pure SQL for PostgreSQL which is just transforming a visible string to the more efficient uuid type. That‘s basically how th
by tpetry 4y ago
You can write a custom data type in pure SQL for PostgreSQL which is just transforming a visible string to the more efficient uuid type.
That‘s basically how the uuid type can be implemented: For storage it‘s binary(16) but all operations transform the value to the visible string you see all the time. It‘s a pretty powerfull feature.
- yencabulator 4y agoI was enthusiastic for a while but https://www.postgresql.org/docs/current/sql-createtype.html https://www.postgresql.org/docs/current/sql-createtype.html > (This restriction is made because an erroneous type definition could confuse or even crash the server.) Uhh, what.. > Generally these functions have to be coded in C or another low-level language. Oh, okay. That sounds like this not really doable with many hosted Postgres services out there.