exception question .... - Mailing list pgsql-general

From madhtr
Subject exception question ....
Date
Msg-id 009f01c79af5$69920230$6401a8c0@useronewin2klt
Whole thread Raw
In response to Data replication through disk replication  (Thomas Lopatic <thomas@lopatic.de>)
Responses Re: exception question ....
List pgsql-general
sry, one more question ...

I want to trap an exception and return a -1 no matter WHAT it is ... what do
i need to replace <anything> with?

>>>>>>
create or replace function clrsplit(int4) returns unknown as
$$
BEGIN
delete from split where tkid=$1;
EXCEPTION
 WHEN <anything>
  return -1;
update tk set dtchksp=null where nid=$1;
return 0;
END
$$ language plpgsql;



pgsql-general by date:

Previous
From: "madhtr"
Date:
Subject: Hex numbers in psql
Next
From: Ben
Date:
Subject: Re: Data replication through disk replication