"Kyril Alyoshin" <[EMAIL PROTECTED]> writes:
> 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

Reply via email to