postgres provider: fix layer detection