server crash: displaying sqlerrm in exception block

Поиск
Список
Период
Сортировка
От Asif Ali
Тема server crash: displaying sqlerrm in exception block
Дата
Msg-id c5110cc50702071307w10ae5c53o3cde280bd783d876@mail.gmail.com
обсуждение исходный текст
Ответы Re: server crash: displaying sqlerrm in exception block  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
PostgreSQL version: 8.2.1
Operating system:   Fedora 3
Description:        server crash
Details:

I have compiled postgres 8.2.1 with gcc 4.1. and when executed this function
it crashes the server.

i also fetched the code from postgres repository (8.3devel) and tested this
code but it still crashing server.


Steps to produce
----------------------

CREATE  OR REPLACE FUNCTION func2() RETURNS int as $$
BEGIN
   RAISE EXCEPTION 'ex -----';
   EXCEPTION
   WHEN OTHERS THEN
   RAISE INFO 'sql error msg %',sqlerrm;
   DECLARE
   v_msg VARCHAR(200) := sqlerrm;
   BEGIN
       RAISE INFO 'sql error msg %',sqlerrm;
     ENd;
RETURN 0;
END;
$$ LANGUAGE plpgsql;

select func2();


Output
---------
INFO:  sql error msg ex -----
server closed the connection unexpectedly
       This probably means the server terminated abnormally
       before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

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

Предыдущее
От: rob_spellberg
Дата:
Сообщение: ah, the irony - an html error on the pgsql-bugs web page
Следующее
От: Tom Lane
Дата:
Сообщение: Re: server crash: displaying sqlerrm in exception block