Postgresql 9.2 compatibility
PARTIAL: first pass at an image resizer