> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Daniel Seichter
> Sent: 21 June 2005 14:58
> To: pgadmin-support@postgresql.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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to