pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: Re: Date Validation?
Date: Fri, 13 Jul 2001 18:04:52 +0100
Message-ID: <006401c10bbd$effc5320$1001a8c0@archonet.com> (raw)
References: <web-85340@davinci.ethosmedia.com>

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




view thread (8+ messages)  latest in thread

Message-ID: <006401c10bbd$effc5320$1001a8c0@archonet.com>
Permalink:  ../006401c10bbd$effc5320$1001a8c0@archonet.com/
Also on:    postgresql.org/message-id/006401c10bbd$effc5320$1001a8c0@archonet.com

 · 

reply

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: dev@archonet.com, josh@agliodbs.com
  Subject: Re: Date Validation?
  In-Reply-To: <006401c10bbd$effc5320$1001a8c0@archonet.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