Re: Date Validation?

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>, "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date Validation?
Date: 2001-07-13 17:44:39
Message-ID: web-85443@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Richard,

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

We are. It's just that all other validation takes place inside the
PL/pgSQL functions in order to keep all the business logic in the
database. Having one form of validation in the interface (PHP) and the
rest in the function can cause the user to go through multiple
validation errors, which is especially frustrating if the second
validation error is fatal. Example:

USER: '2001-06-31'

PHP Validation: '2001-06-31 is not a valid date.'

USER: '2001-06-30'

PL/pgSQL FUNCTION: 'Your session has timed out. Please log back in.'

USER: '%^#$&*&#!!!'

See what I mean? Not a showstopper, but it mars our otherwise
user-friendly validation formula.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-07-13 18:25:45 Re: No subselects in constraint (bug?)
Previous Message Ari Nepon 2001-07-13 17:38:50 You have an error in your SQL syntax near '' at line 1