adapter to pg