Fixing postgresql error with eschemas

Fixing error of issue #970