Re: BUG #18589: pg_get_viewdef returns wrong query

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #18589: pg_get_viewdef returns wrong query
Дата
Msg-id CAMbWs4_AP5Rrw8bc3N+E_fUVKc3_AWZexyWJRujRFyM-CcPyYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18589: pg_get_viewdef returns wrong query  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #18589: pg_get_viewdef returns wrong query
Список pgsql-bugs
On Thu, Aug 29, 2024 at 3:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I was just about to commit v2 when I realized that it's wrong, because
> what we need to be checking against is the output column name(s) that
> get_target_list() will print, and that's not necessarily tle->resname.
> You can in fact make v2 misbehave with ALTER VIEW RENAME COLUMN, as
> shown by the added test cases in attached v3.

Ah yes, we need to match the column name from the view's tuple
descriptor, which may differ from tle->resname after column RENAME.

+1 to v3.

Thanks
Richard



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