Fixed a bug where the PG dialiect didn't handled undefined variables