Re: Date Validation? - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Date Validation?
Date
Msg-id 006401c10bbd$effc5320$1001a8c0@archonet.com
Whole thread Raw
In response to Date Validation?  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Date Validation?
List pgsql-sql
From: "Josh Berkus" <josh@agliodbs.com>

> Folks,
>
> Pardon me for asking this again, but I received *no* responses last
> week.
>
> Question:  Is there any function or method which will allow me, in SQL
> or PL/pgSQL, to validate dates without raising an error for invalid
> dates?
>
> Expansion:  I have a number of PL/pgSQL functions which must accept
> dates as parameters from the PHP4 interface.  There is, however, the
> possibility that an invalid date will be passed, such as "2001-02-31"
> due to the nature of HTML forms date selector.

Out of curiosity Josh, why aren't you validating in PHP? - only takes a
couple of lines there.

- Richard Huxton



pgsql-sql by date:

Previous
From: "Ari Nepon"
Date:
Subject: You have an error in your SQL syntax near '' at line 1
Next
From: "Josh Berkus"
Date:
Subject: Re: Date Validation?