checking date format with postgresql without creating a table

From: Neil Zanella <nzanella(at)gpu(dot)srv(dot)ualberta(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: checking date format with postgresql without creating a table
Date: 2001-11-19 10:30:11
Message-ID: Pine.A41.4.33.0111190325360.26044-100000@gpu1.srv.ualberta.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

I would like to be able to check whether some date is a valid date by
asking postgresql? Is this possible? The idea is that when an invalid
date is entered into a postgresql table an error is output. Thus to
check the validity of a date from JDBC in a rather lazy way one could
create a table called checkdate with a single column of type date and
insert into that column. If the database generates an error than an
SQLException is output and the user knows that the date is incorrect
and thus needs to prompt for a date again. Now I want to do the
above without having to create any tables. Is this possible?

Thanks,

Neil

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arsalan Zaidi 2001-11-19 10:31:43 nested select query take too long
Previous Message Luis Amigo 2001-11-19 07:58:04 Re: Unsigned types