X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id D86CC924EFA for ; Tue, 20 May 2003 10:59:03 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 77615-02 for ; Tue, 20 May 2003 10:58:49 -0400 (EDT) Received: from europa.janwieck.net (h00045a2e4e7c.ne.client2.attbi.com [24.131.181.55]) by developer.postgresql.org (Postfix) with ESMTP id 143FF924EEB for ; Tue, 20 May 2003 10:58:49 -0400 (EDT) Received: from Yahoo.com (linksys.janwieck.net [192.168.192.1]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h4KEwja06329; Tue, 20 May 2003 10:58:45 -0400 Message-ID: <3ECA4271.4080400@Yahoo.com> Date: Tue, 20 May 2003 10:57:53 -0400 From: Jan Wieck Organization: Unorganized User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Achilleus Mantzios Cc: Christoph Haller , pgsql-sql@postgresql.org, rlucas@tercent.net Subject: Re: Testing castability of text to numeric References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/384 X-Sequence-Number: 13549 Achilleus Mantzios wrote: > On Fri, 16 May 2003, Christoph Haller wrote: > > >>>I am trying to create a function that will test if a given text value >>>may safely be cast to numeric, returning the numeric cast or null if >>>impossible. >> > > I think that progress is being made on > having java as a serverside language > (i.e. plpgjava). > Stored procedures in java would be really handy in order > to do staff like that, java is known for its > "exceptional" exception handling! It doesn't matter how exceptional Java's exception handling is. PostgreSQL's exception handling is just like a black hole - once the gravity got it, you won't get your transaction back ever. The current effort on subtransactions might change that. But I'm not sure what performance impact or other side effects it will have to execute every single statement inside of a stored procedure as a separate subtransaction just to have catchable exceptions. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #