Thursday, January 31, 2013

mysql enable timezone conversion by zoneinfo database timezone labels

If convert_tz(now(),'UTC','US/Pacific') produced null do a

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

Monday, January 28, 2013

postgres grant to all tables

select 'grant all on '||schemaname||'.'||tablename||' to bar;' from pg_tables where schemaname in ('baz', 'quux') order by schemaname, tablename;

taken from: http://bensbrain.blogspot.com/2004/08/postgres-grant-on-all-tables-in.html