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

BUG #5273: Unexpected function behavior/failure

From: "Vee" <sefer(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5273: Unexpected function behavior/failure
Date: 2010-01-12 22:30:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5273
Logged by:          Vee
Email address:      sefer(at)hotmail(dot)com
PostgreSQL version: 8.4.2
Operating system:   Linux
Description:        Unexpected function behavior/failure


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
But I would not expect a "select" clause to effectively filter out results
for me.

I'd appreciate your input on the matter.



pgsql-bugs by date

Next:From: Tom LaneDate: 2010-01-13 00:45:44
Subject: Re: BUG #5273: Unexpected function behavior/failure
Previous:From: Ted ClarkDate: 2010-01-12 16:26:23
Subject: BUG #2197: PostgreSQL error- 'could not read block 0 of relation'

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