From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | n(dot)lutic(at)loxodata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name. |
Date: | 2022-05-20 15:19:33 |
Message-ID: | 347193.1653059973@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> On 20 May 2022, at 16:34, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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.
> That might be the path of least confusion, and as you rightly say, if you don't
> like the ugliness then there is a very easy way to fix it.
Hmm ... it's a very easy code change, but it results in a lot of
changes in the regression tests (and I've only tried the core tests
so far). Given the lack of prior complaints, I wonder if it's going
to be worth this much behavioral churn.
It'd be better if we could do this only when the name is actually
referenced somewhere, but I don't think that's an easy thing to
determine.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
tweak-ruleutils-column-name-rule.patch | text/x-diff | 517 bytes |
regression.diffs | text/x-diff | 11.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-05-20 15:23:19 | Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands |
Previous Message | Daniel Gustafsson | 2022-05-20 15:07:29 | Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name. |