Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name.
Дата
Msg-id 334334.1653057260@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name.  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name.  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-bugs
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 19 May 2022, at 14:03, PG Bug reporting form <noreply@postgresql.org> wrote:
>> I found something weird. Restoring a view fails if this view contains an
>> attribute without alias name.

> This is not unique to 14, it can be reproduced further down as well.

Yeah, it's an ancient behavior; interesting that no one has complained
before.  This code in ruleutils is assuming that FigureColname will
make the same choice at reload as it did before; which is shaky both
because we aren't necessarily printing the identical raw text, and
because there's no guarantee we won't change those rules in future.

Perhaps we should just tweak ruleutils so that the alias is always
printed for non-Var columns, even when it's "?column?".  That's kind of
ugly, but if you wanted non-ugly you should have selected a better column
name to start with.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unable to connect to PostgreSQL DB as root user when private key is owned by root with permission 640