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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: n.lutic@loxodata.com, pgsql-bugs@lists.postgresql.org
Date: 2022-05-21T18:47:02Z
Lists: pgsql-bugs
Daniel Gustafsson <daniel@yesql.se> writes:
> On 20 May 2022, at 19:05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I thought of a compromise position that's not hard to implement:
>> change the behavior only if the SELECT output column name is *possibly*
>> visible elsewhere, which it is not in (for example) an EXISTS subquery.

> Nice one!  I think that's even better than the previous version actually.
> Skimming the patch it seems like a reasonable approach.

Pushed, thanks for looking.

			regards, tom lane



Commits

  1. Show 'AS "?column?"' explicitly when it's important.