4 ms·
You can also use the SQL value of NOW(). It's always set to the start of the current transaction. http://www.postgresql.org/docs/current/static/functions-datet
by yummyfajitas 14y ago
You can also use the SQL value of NOW(). It's always set to the start of the current transaction.
http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT http://www.postgresql.org/docs/current/static/functions-date...
- mpweiher 14y agoWell you could, but now you've coupled your system to the database.
- rapind 14y agoWhich if we're going to be honest is a hugely overhyped issue. Note: I base this on how often I've swapped out the database for a project in the past 15 years (maybe twice?) of writing mostly database backed software.
- mpweiher 14y agoIt's not the swapping, it's the (configuration) complexity and test performance, among other issues. See http://www.confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years http://www.confreaks.com/videos/759-rubymidwest2011-keynote-.... I particularly like the example he gives near the end of always thinking they need to add the database and finally, after shipping to a bunch of customers, figuring out that they didn't actually need it. In terms of test performance, I frequently see blog posts about reducing the time for a couple of hundred tests from half an hour to 15 minutes. marcel@localhost[~]time testlogger -a MPWFoundation ObjectiveSmalltalk ObjectiveXML EGOS EGOS_Cocoa MPWSideWeb tests:1: warning: 1055 tests (of 1055) executed, 0 failures (100 % success rate) real 0m2.939s user 0m1.607s sys 0m0.438s