From: Josh Berkus <josh@agliodbs.com>
To: Philippe Lang <philippe.lang@attiksystem.ch>
To: pgsql-sql@postgresql.org
Subject: Re: Datetime conversion in WHERE clause
Date: Thu, 9 Sep 2004 11:42:41 -0700
Message-ID: <200409091142.41872.josh@agliodbs.com> (raw)
In-Reply-To: <6C0CF58A187DA5479245E0830AF84F420803F0@poweredge.attiksystem.ch>
References: <6C0CF58A187DA5479245E0830AF84F420803F0@poweredge.attiksystem.ch>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, philippe.lang@attiksystem.ch
Subject: Re: Datetime conversion in WHERE clause
In-Reply-To: <200409091142.41872.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox