Skip site navigation (1) Skip section navigation (2)

BUG #2127: Regular Expression Limits Do Not Work

From: "Kyril Alyoshin" <kyrill(at)technolog(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2127: Regular Expression Limits Do Not Work
Date: 2005-12-25 20:35:49
Message-ID: 20051225203549.3CF2AF0AC8@svr2.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2127
Logged by:          Kyril Alyoshin
Email address:      kyrill(at)technolog(dot)ca
PostgreSQL version: 8.0.3
Operating system:   Windows XP
Description:        Regular Expression Limits Do Not Work
Details: 

I am writing a regex to verify US zipcodes. The expression is very simple,
in a trigger function it looks like this:

IF (NEW.postal_code_name !~ '\\d{5}')
THEN
    RAISE EXCEPTION 'error';
END IF;

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.

Thank you.

Kyrill

Responses

pgsql-bugs by date

Next:From: venkatDate: 2005-12-26 11:55:29
Subject: BUG #2128: unable to install win32 version of pgsql 8.1.1
Previous:From: Grzegorz TaczykDate: 2005-12-25 14:54:10
Subject: BUG #2126: Index usage for function value

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group