X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D35E8329C89 for ; Thu, 9 Sep 2004 19:42:43 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46498-10 for ; Thu, 9 Sep 2004 18:42:38 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id C3E7B329C65 for ; Thu, 9 Sep 2004 19:42:39 +0100 (BST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6312756; Thu, 09 Sep 2004 11:43:58 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Philippe Lang" , Subject: Re: Datetime conversion in WHERE clause Date: Thu, 9 Sep 2004 11:42:41 -0700 User-Agent: KMail/1.4.3 References: <6C0CF58A187DA5479245E0830AF84F420803F0@poweredge.attiksystem.ch> In-Reply-To: <6C0CF58A187DA5479245E0830AF84F420803F0@poweredge.attiksystem.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200409091142.41872.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/65 X-Sequence-Number: 18911 Philippe, > Is there a way to force the date conversion to fail sliently, and simply > return a null in case the parameter is not a valid date? You'd need to write a custom function, using an external language that allows you to test for valid date values. I prefer using PL/perlU with Date::Manip, but use what you like. -- Josh Berkus Aglio Database Solutions San Francisco