Filter by templated schema name for postgres queries (#21635)

There were certain queries which did not filter
by the current schema, but hardcoded public schema.

Apart from that, we always filter with the current schema
which allows connection proxies to run multiple MM within
a single DB.
```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-11-11 13:03:28 +05:30
коммит произвёл GitHub
родитель f07de38cc5
Коммит 91f7eb0957
32 изменённых файлов: 46 добавлений и 5 удалений

Просмотреть файл

@@ -54,6 +54,7 @@ BEGIN
SELECT count(*) != 0 INTO column_exist
FROM information_schema.columns
WHERE table_name = 'users'
AND table_schema = current_schema()
AND column_name = 'roles'
AND NOT data_type = 'varchar(256)';
IF column_exist THEN