X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 93EF4925288 for ; Wed, 21 May 2003 04:58:14 -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 64679-02 for ; Wed, 21 May 2003 04:57:54 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by developer.postgresql.org (Postfix) with ESMTP id 5B10B925365 for ; Wed, 21 May 2003 04:51:36 -0400 (EDT) Received: from matrix.gatewaynet.com (localhost [127.0.0.1]) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h4LDtcEP019083; Wed, 21 May 2003 11:55:38 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h4LDtbFn019079; Wed, 21 May 2003 11:55:37 -0200 Date: Wed, 21 May 2003 11:55:37 -0200 (GMT+2) From: Achilleus Mantzios To: Jan Wieck Cc: Christoph Haller , , Subject: Re: Testing castability of text to numeric In-Reply-To: <3ECA4271.4080400@Yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/407 X-Sequence-Number: 13572 On Tue, 20 May 2003, Jan Wieck wrote: > 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! I would say, why offload such tasks (the fellow pgsql'er talked about casting exceptions) to postgresql when you can do that better in the client side language. > > 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 > > -- ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr