Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DE9512E0041 for ; Fri, 23 Nov 2007 05:46:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27850-04 for ; Fri, 23 Nov 2007 05:46:35 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 7AC2E2E003B for ; Fri, 23 Nov 2007 05:46:34 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id lAN9kUml073005 for ; Fri, 23 Nov 2007 05:46:30 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id lAN9NCHf030893 for pgsql-sql@postgresql.org; Fri, 23 Nov 2007 05:23:12 -0400 (AST) (envelope-from news) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: Aleatory exception Date: Fri, 23 Nov 2007 11:23:15 +0200 Organization: Hub.Org Networking Services Lines: 15 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/123 X-Sequence-Number: 29651 Hi there, I have a custom function where I execute a dynamic statement. I trap the exceptions, and sometimes I got the following error data: SQLSTATE = 22P02, SQLERRM = invalid input syntax for integer: "NULL::int4" For instance I got this for the following statement string: Please explain what could be the reason ? TIA, Sabin