Re: enforcing alphabetic/numeric content in "char" column - Mailing list pgsql-novice

From Tom Lane
Subject Re: enforcing alphabetic/numeric content in "char" column
Date
Msg-id 23305.1036692165@sss.pgh.pa.us
Whole thread Raw
In response to Re: enforcing alphabetic/numeric content in "char" column  (Rod Kreisler <rod@23net.net>)
List pgsql-novice
Rod Kreisler <rod@23net.net> writes:
> Your regex should be '^[0-9]$' (the one you have will allow any string as
> long as there is a numeric character in it somewhere).

Almost: that only allows a single digit.  Probably '^[0-9]+$' is the
correct regex.

            regards, tom lane

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: enforcing alphabetic/numeric content in "char" column
Next
From: "Michael Paesold"
Date:
Subject: Re: enforcing alphabetic/numeric content in "char" column