I've read a recipe that used Postgres table inheritance to achieve sharding in a way it's mostly transparent to the client. The blog post read like a conversation between two people. Unfortunately I'm not finding the link anymore.
EDIT:
Found it at https://raw.githubusercontent.com/fiksu/partitioned/master/P... in case anyone find interesting.