Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Why the hell would I want to have "DEFAULT NULL" treated as "DEFAULT CURRENT_TIMESTAMP"?

    Because I certainly don't believe that all of my middleware has the exact same time, and I want a single canonical reference for the time I added a row to the database.

    Maybe I'm too lazy always to include now() every time I insert a row into the table, and I'm definitely too lazy to write a stored procedure to insert the row or a trigger to set those values, but the fewer magical things the middleware has to do and

    • I can't say you've provided a convincing argument for why a DEFAULT NULL gets current timestamp or 0 depending on it's position.

      If the the designer has said they want an empty timestamp to default to NULL, the value should be NULL, not whatever the database decides to do with it.

      What if my first timestamp column in a table represents the date that I shipped an order to a customer and the second represents the date it was ordered? If I haven't shipped it to the customer yet ... ? That's one heck of an odd im