Figure out pgsql trigger procedures