Adrian Rossouw wrote:
Due to the fact that we use timestamps, this gets a bit more complex, as we need to do a whole lot of casting.
Mysql : update sometable set next_bill_date = unix_timestamp(date_add (form_unixtime(next_bill_date), interval 1 month))) where cid in ();
Postgres : update sometable set next_bill_date = extract(epoch from (TIMESTAMP WITH TIME ZONE 'epoch' + created * interval '1 second) + '1 month')::int where cid in ();
What complicates matters is how drastically different postgres and mysql handle dates, and the thing is in our specific use case, I'm not sure what benefits database field types would give us without adding a whole lot of possibly unnecessary complexity.
IIRC this was the argument that lead to us to keep timestamps for events after lenghty discussions in Antwerp one year ago. I still don't like it. :p Cheers, Gerhard