hacking away at POSTGRES NONSENSE