basic protocol implementation for postgres record