Low level PostgreSQL routines