From: | Gnanavel Shanmugam <s(dot)gnanavel(at)inbox(dot)com> |
---|---|
To: | Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: rejecting characters in a field |
Date: | 2005-06-09 07:15:56 |
Message-ID: | A9728DAE1B0.000008DFs.gnanavel@inbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
add check constraint with following pattern
check(name !~ '[*/^#]')
with regards,
S.Gnanavel
> -----Original Message-----
> From: lawgon(at)thenilgiris(dot)com
> Sent: Thu, 9 Jun 2005 12:36:31 +0530
> To: pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2005-06-09 07:18:09 | Re: [despammed] rejecting characters in a field |
Previous Message | Kenneth Gonsalves | 2005-06-09 07:06:31 | rejecting characters in a field |