Re: Date Validation?

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date Validation?
Date: 2001-07-13 17:04:52
Message-ID: 006401c10bbd$effc5320$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: "Josh Berkus" <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ari Nepon 2001-07-13 17:38:50 You have an error in your SQL syntax near '' at line 1
Previous Message Andre Schnabel 2001-07-13 16:41:29 Re: How can we match a condition among 2 diff. tables?