Re: rejecting characters in a field - Mailing list pgsql-sql

From Gnanavel Shanmugam
Subject Re: rejecting characters in a field
Date
Msg-id A9728DAE1B0.000008DFs.gnanavel@inbox.com
Whole thread Raw
In response to rejecting characters in a field  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
List pgsql-sql
add check constraint with following pattern
check(name !~ '[*/^#]')

with regards,
S.Gnanavel


> -----Original Message-----
> From: lawgon@thenilgiris.com
> Sent: Thu, 9 Jun 2005 12:36:31 +0530
> To: pgsql-sql@postgresql.org
> Subject: [SQL] rejecting characters in a field
>
> hi
> i have a table with a varchar field called 'name'. I want postgres to
> reject any insert with characters defined as illegal characters, for
> example '*/^#'. How do i do this?
> --
> regards
> kg
>
> http://www.livejournal.com/users/lawgon
> tally ho! http://avsap.sourceforge.net
> ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

pgsql-sql by date:

Previous
From: Kenneth Gonsalves
Date:
Subject: rejecting characters in a field
Next
From: Andreas Kretschmer
Date:
Subject: Re: [despammed] rejecting characters in a field