BUG #2785: Exception Issue

Поиск
Список
Период
Сортировка
Искать
От
Patrick Hayes
Тема
BUG #2785: Exception Issue
Дата
Msg-id
200611271804.kARI45tP053721@wwwmaster.postgresql.org
Список
Дерево обсуждения
BUG #2785: Exception Issue "Patrick Hayes" <pkhayeskp@hotmail.com>
Re: BUG #2785: Exception Issue Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2785: Exception Issue "pat hayes" <pkhayeskp@hotmail.com>
The following bug has been logged online:

Bug reference:      2785
Logged by:          Patrick Hayes
Email address:      pkhayeskp@hotmail.com
PostgreSQL version: 8.1
Operating system:   Windows Professional
Description:        Exception Issue
Details: 

I am defining Exception blocks.  When I put something that others in the
when clause, it will not compile. The others clause works fine.

The following is working fine.
BEGIN

PPSDATA.member_date_of_birth=date(substr(ROWDATA.inline,55,4)||'-'||
substr(ROWDATA.inline,59,2)||'-'||substr(ROWDATA.inline,61,2));
EXCEPTION WHEN OTHERS THEN
   ERRORCODE:='Y';
   PPSERROR.current_month_error:='*';
END;

The following is not working fine.
BEGIN
select count(*) into cnt_county from county_code
  where county_code = PPSERROR.member_county_code;
EXCEPTION
WHEN no_data then
  PPSERROR.member_county_code_error:='*';
  RAISE NOTICE '  ---county_code_error out %', PPSERROR.member_county_code;
  ERRORCODE:='Y';
END;


I get the following error.

postgres-# language plpgsql;
ERROR:  unrecognized exception condition "no_data"
CONTEXT:  compile of PL/pgSQL function "chip_pps_data_check" near line 101

Thanks
В списке pgsql-bugs по дате отправления
От: Greg Peters
Дата:
От: Pete Deffendol
Дата:
FAQ