Re: Increased error verbosity when querying row-returning functions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Increased error verbosity when querying row-returning functions
Дата
Msg-id 20050111234207.GA10879@dcc.uchile.cl
обсуждение исходный текст
Ответ на Increased error verbosity when querying row-returning functions  (Brendan Jurd <blakjak@blakjak.sytes.net>)
Ответы Re: Increased error verbosity when querying row-returning  (Brendan Jurd <blakjak@blakjak.sytes.net>)
Список pgsql-patches
On Wed, Jan 12, 2005 at 09:23:26AM +1100, Brendan Jurd wrote:
> This patch to src/backend/executor/nodeFunctionscan.c is intended to
> make life a little easier for people using row-returning functions, by
> increasing the level of detail in the error messages thrown when
> tupledesc_match fails.

You should get rid of the returns, because ereport(ERROR) will never
return control to the function and they are thus dead code.  And make
the function return void rather than bool.

Also follow the style: use "if (foo)" rather than "if( foo )".  And
message style stipulates that the errdetail() message should start with
a capital (upper case?) letter.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)

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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Increased error verbosity when querying row-returning functions
Следующее
От: Brendan Jurd
Дата:
Сообщение: Re: Increased error verbosity when querying row-returning