Re: BUG #14220: pg_get_expr() with an incorrect relation id crashes the server

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14220: pg_get_expr() with an incorrect relation id crashes the server
Дата
Msg-id 18868.1467383553@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #14220: pg_get_expr() with an incorrect relation id crashes the server  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> I have poked at this bug report yesterday and today, and found that it
> is as well possible to hit the second assertion two lines below with a
> dropped column. So I would like to propose the patch attached to
> replace both assertions with an elog(ERROR).

There's a quite similar error check just a few lines above that prints

        elog(ERROR, "bogus varattno for subquery var: %d", var->varattno);

I'm not necessarily wedded to that exact phrasing, but I think these new
error messages should be consistent with that one.  I'm a bit inclined
to make all three of them read like

        elog(ERROR, "invalid attnum %d for table \"%s\"",
             attnum, rte->eref->aliasname);

> Test cases are included,
> though I am not sure if they bring much value.

Yeah, I can't get very excited about memorializing those.

            regards, tom lane

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

Предыдущее
От: lishengxian123@163.com
Дата:
Сообщение: BUG #14221: using postgresql 9.1.22 to 9.3.13 failed using pg_upgrade
Следующее
От: pange.akshaya@gmail.com
Дата:
Сообщение: BUG #14222: psqlODBC driver connection pooling not working for .net codebase