Schema name for postgres and sqlserver

Continue and complete #3924 I've added tests for postgres and SQLserver.