pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas
2+ messages / 2 participants
[nested] [flat]

* BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas
@ 2020-02-08 18:16 PG Bug reporting form <noreply@postgresql.org>
  2020-02-08 18:37 ` Re: BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-02-08 18:16 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: filip.vukovinski@net.hr

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas
  2020-02-08 18:16 BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas PG Bug reporting form <noreply@postgresql.org>
@ 2020-02-08 18:37 ` Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Pavel Stehule @ 2020-02-08 18:37 UTC (permalink / raw)
  To: filip.vukovinski@net.hr, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-02-08 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 18:16 BUG #16252: PL/pgSQL dynamic programming not well suited for working with different schemas PG Bug reporting form <noreply@postgresql.org>
2020-02-08 18:37 ` Pavel Stehule <pavel.stehule@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox