Neither PostgreSQL[1] nor SQLite[2] support unsigned 64-bit integers at the SQL level. However, I do need to save those unsigned 64-bit integers as-is into database, as they are not numbers but hash values.
What's the proper way to cast my uint64 as database *signed* integer and back safely in Go? Let's use 8-bit variable as example, in C, I just *assign* the unsigned 8-bit variable to a signed 8-bit variable, so 255 will "*looks like*" -1 when in latter form. However, *no info is lost*, and when I assign it back from signed 8-bit variable, I'm still getting 255. How to do the same thing in Go? Thanks [1] https://stackoverflow.com/questions/21909027/postgres-data-types-how-to-store-uint64-in-postresql [2] https://sqlite.org/datatype3.html -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.