How to add month.year column validation

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to add month.year column validation
Date: 2009-12-22 20:03:06
Message-ID: 94B87F34244142548ABE27C8A81BC354@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Database contains CHAR(7) type column which must be NOT NULL and must be in
the format

mm.yyyy

where:

mm - month number, always two digits in range 01 .. 12

. - separator must be point always.

yyyy - must be four digits in range approx. 1980 .. 2110 .

How to add column validation to table column which forces this ?

Andrus.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2009-12-22 20:09:46 Re: Not finding RPMs for 8.4.2!
Previous Message Andrew Crouch 2009-12-22 19:38:12 Re: Archive command seem to be working.