Re: How to add month.year column validation - Mailing list pgsql-general

From Andy Shellam
Subject Re: How to add month.year column validation
Date
Msg-id C468E3EE-6B45-4092-BED3-4391FA4E9C96@networkmail.eu
Whole thread Raw
In response to How to add month.year column validation  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
Hi Andrus,


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


You're looking for a constraint - I presume you know what conditions you want to check for - I've done a similar thing
recentlyensuring the first character in a column is a decimal point, or that if one column's value is something,
anothercolumn's value is within a certain range etc. 

http://www.postgresql.org/docs/8.4/static/ddl-constraints.html (assuming you're running 8.4)

Regards,
Andy

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: How to add month.year column validation
Next
From: Michael Glaesemann
Date:
Subject: Re: How to add month.year column validation