News for hackers. Stuff that matters.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by NelsonMinar on Saturday January 01, 2022 @10:38AM (#29759308)
So.. are database IDs numbers? Because they sure are autoincrement integers in almost every DBMS. I always thought that was a mistake but it's practical.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by masklinn on Saturday January 01, 2022 @11:17AM (#29759785)
> So.. are database IDs numbers?

No.

> Because they sure are autoincrement integers in almost every DBMS.

The autoincrement occurs before it's a database ID. The generator for database ids is a sequence, that has no bearing on the semantics of the database ids.

Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by Quekid5 on Saturday January 01, 2022 @10:41AM (#29759346)
Yes, but as soon as they leave the realm of the DB itself, they (should) become opaque identifiers.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by marcosdumay on Saturday January 01, 2022 @11:43AM (#29760074)
They are absolutely not numbers.

As many people already commented, it's reasonable to encode things as numbers as long as you keep in mind there's an encoding operation with it's possible flaws.

Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by kenjackson on Saturday January 01, 2022 @12:43PM (#29760682)
Honestly that seems like a cop out.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by marcosdumay on Saturday January 01, 2022 @03:42PM (#29762506)
The usual habit of typing ids as integral numbers is incorrect, they are not numbers. But the problems it causes are well known and dealt with by what is broadly known as good practices.

Is it better this way?

(You can see the problems clashing with each other if you search for discussions about defaulting ids to 32 or 64 bits. So they are not completely solved, the practices are just good enough that things don't usually break on practice.)

At the end of the day, all you have on a computer is a bitfield to mess around. You will always have to deal with encoding at some point.

Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by Spivak on Saturday January 01, 2022 @01:16PM (#29761003)
I mean strings are numbers if you want to be that reductive. The “on-disk” representation of the thing is independent of its real type and properties.

So sure, store a date in an “integer” but if you try to treat it like one instead of a bitfield you’ve made an error and if your storage isn’t wide enough to hold all dates that’s gonna be a PITA later.

Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by mind-blight on Saturday January 01, 2022 @11:30AM (#29759942)
It's becoming pretty standard to use UUIDs over integers now. That provides more architectural flexibility