Re: Add 'CHECK( length(fieldname) > 0 )' to a field - Mailing list pgadmin-support

From Dave Page
Subject Re: Add 'CHECK( length(fieldname) > 0 )' to a field
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E490E602@ratbert.vale-housing.co.uk
Whole thread Raw
In response to Add 'CHECK( length(fieldname) > 0 )' to a field  ("Daniel Seichter" <dseichter@radiomatic.com>)
List pgadmin-support

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] 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


pgadmin-support by date:

Previous
From: "Daniel Seichter"
Date:
Subject: Add 'CHECK( length(fieldname) > 0 )' to a field
Next
From: Vasilev Max
Date:
Subject: pgadmin3-1.2.2 for SuSE Linux 9.3