Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D54306333CA for ; Tue, 12 Jan 2010 18:30:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 98032-01 for ; Tue, 12 Jan 2010 22:30:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 21AF5632A74 for ; Tue, 12 Jan 2010 18:30:33 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id o0CMUWcO000321 for ; Tue, 12 Jan 2010 22:30:32 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id o0CMUWFS000320; Tue, 12 Jan 2010 22:30:32 GMT (envelope-from www) Date: Tue, 12 Jan 2010 22:30:32 GMT Message-Id: <201001122230.o0CMUWFS000320@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5273: Unexpected function behavior/failure From: "Vee" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=x tagged_above=-10 required=5 WHITELISTED X-Spam-Level: X-Archive-Number: 201001/103 X-Sequence-Number: 25607 The following bug has been logged online: Bug reference: 5273 Logged by: Vee Email address: sefer@hotmail.com PostgreSQL version: 8.4.2 Operating system: Linux Description: Unexpected function behavior/failure Details: Hi, I have an odd problem using certain regular expressions (as opposed to any other function) with PostgreSql 8.4.2, I was hoping you could enlighten me as to what am I doing wrong. -- Create the table and populate it. create table test ( data text ); insert into test values ('hello'), ('world'), ('bridge'); -- Test query. select data, upper(data) from test; > hello HELLO > world WORLD > bridge BRIDGE -- The problem query select data, regexp_matches(data, '(h..l)') from test; > hello {hell} Since I have no "where" clause, I would expect to see all the rows in the result of the second case, with possibly a NULL value for the non-matched rows. But I would not expect a "select" clause to effectively filter out results for me. I'd appreciate your input on the matter. Thanks, Vee.