Re: BUG #16252: PL/pgSQL dynamic programming not well suited forworking with different schemas

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: BUG #16252: PL/pgSQL dynamic programming not well suited forworking with different schemas
Дата
Msg-id CAFj8pRDVk3C0aQgVOHQ-L2LDWogt4s3MBW73zjgYBjZfhedp6g@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs


so 8. 2. 2020 v 19:17 odesílatel PG Bug reporting form <noreply@postgresql.org> napsal:
The following bug has been logged on the website:

Bug reference:      16252
Logged by:          Filip Vukovinski
Email address:      filip.vukovinski@net.hr
PostgreSQL version: 12.0
Operating system:   Windows 10 18362
Description:       

The %I format specifier for identifiers, does not handle table schema
prefixes.


sure. It is expected. Nobody can detect if "." inside name means part of name or special symbol.

If you want to handle schema, you should to write some 

format("SELECT * FROM %I.%I", schema_name, table_name);

For identifier separation, you can use "parse_ident" function

postgres=# SELECT parse_ident('a.b.cax."ass.ss"');
┌──────────────────┐
│   parse_ident    │
╞══════════════════╡
│ {a,b,cax,ass.ss} │
└──────────────────┘
(1 row)



Regards

Pavel


 

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dan Hayes
Дата:
Сообщение: Re: BUG #16245: proj63 from rhel-7 repo depends on sqlite33, but isnot available
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: BUG #16251: ::text type casting of a constant breaks query performance