Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled
| От | Tom Lane |
|---|---|
| Тема | Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled |
| Дата | |
| Msg-id | 105329.1660091587@sss.pgh.pa.us обсуждение |
| Ответ на | pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled (Lukas Fittl <lukas@fittl.com>) |
| Ответы |
Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled
|
| Список | pgsql-hackers |
Lukas Fittl <lukas@fittl.com> writes:
> Whilst debugging an issue with the output of pg_get_constraintdef, we've
> discovered that pg_get_constraintdef doesn't schema qualify foreign tables
> mentioned in the REFERENCES clause, even if pretty printing
> (PRETTYFLAG_SCHEMA) is turned off.
> This is a problem because it means there is no way to get a constraint
> definition that can be recreated on another system when multiple schemas
> are in use, but a different search_path is set. It's also different from
> pg_get_indexdef, where this flag is correctly respected.
I would say that pg_get_indexdef is the one that's out of step.
I count 11 calls of generate_relation_name in ruleutils.c,
of which only three have this business of being overridden
when not-pretty. What is the rationale for that, and why
would we move pg_get_constraintdef from one category to the
other?
regards, tom lane
В списке pgsql-hackers по дате отправления: