Re: BUG #2127: Regular Expression Limits Do Not Work
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: "Kyril Alyoshin" <kyrill(at)technolog(dot)ca>
- Cc: pgsql-bugs(at)postgresql(dot)org
- Subject: Re: BUG #2127: Regular Expression Limits Do Not Work
- Date: Tue, 27 Dec 2005 10:22:28 -0500
- Message-id: <23077.1135696948@sss.pgh.pa.us> <text/plain>
"Kyril Alyoshin" <kyrill(at)technolog(dot)ca> 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
Home |
Main Index |
Thread Index