From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Daniel Seichter" <dseichter(at)radiomatic(dot)com>, <pgadmin-support(at)postgresql(dot)org> |
Subject: | Re: Add 'CHECK( length(fieldname) > 0 )' to a field |
Date: | 2005-06-21 14:13:07 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E490E602@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
> -----Original Message-----
> From: pgadmin-support-owner(at)postgresql(dot)org
> [mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of
> Daniel Seichter
> Sent: 21 June 2005 14:58
> To: pgadmin-support(at)postgresql(dot)org
> Subject: [pgadmin-support] Add 'CHECK( length(fieldname) > 0
> )' to a field
>
> Hello,
>
> I have to let postgreSQL check the length of some fields in a
> database.
> So I want to add the SQL Code "CHECK( length(fieldname) > 0 )" to some
> fields so that the check will be executed during INSERT statement.
> With the properties dialog I can't add the CHECK statement,
> so maybe it
> isn't possible or I have to take a look to something. But to what?
>
> Thank you in advance
Hi,
You can add a new table constraint (to check one or more columns) by
right-clicking the Constraints node under the table and selecting New
Object -> New Check Constraint. I don't think any of us ever saw much
value in allowing constraints directly on individual columns as well -
it would just over-complicate the GUI for no real gain.
Regards, Dave
From | Date | Subject | |
---|---|---|---|
Next Message | Vasilev Max | 2005-06-22 08:32:10 | pgadmin3-1.2.2 for SuSE Linux 9.3 |
Previous Message | Daniel Seichter | 2005-06-21 13:58:02 | Add 'CHECK( length(fieldname) > 0 )' to a field |