"Kyril Alyoshin" <kyrill (AT) technolog (DOT) ca> writes:
Quote:
IF (NEW.postal_code_name !~ '\\d{5}')
The bug description is:
If postal_code_name is > 5 digits, the expression would still evaluate to
false, and the error will not be raised.
Please correct this. |
Please learn how to use regular expressions ;-)
You probably want '^\\d{5}$' instead, to require the regex to match the
whole string instead of just any part of it.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq