Re: [BUGS] BUG #6079: Wrong select result

2011-06-29 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: 2011/6/28 Renat renat.nasy...@itv.ru: select * from foo where date_to is null and date_to '2011-01-01' Expected: 0 rows But: it return 1 row with id=2 The problem seems to be in _bt_preprocess_keys(), which discards the a 1 predicate in

[BUGS] BUG #6079: Wrong select result

2011-06-28 Thread Renat
The following bug has been logged online: Bug reference: 6079 Logged by: Renat Email address: renat.nasy...@itv.ru PostgreSQL version: 9.0.4 Operating system: Windows Description:Wrong select result Details: INPUT: create table foo ( id bigint not null, date_to

Re: [BUGS] BUG #6079: Wrong select result

2011-06-28 Thread Pavel Stehule
Hello It working as expected on 9.0.4 Linux. Please, can you recheck your application? Try to use a console - psql, postgres=# select * from foo where date_to is null and date_to '2011-01-01'; id | date_to +- (0 rows) Regards Pavel Stehule 2011/6/28 Renat renat.nasy...@itv.ru:

Re: [BUGS] BUG #6079: Wrong select result

2011-06-28 Thread Dean Rasheed
2011/6/28 Renat renat.nasy...@itv.ru: create table foo ( id bigint not null, date_to timestamp without time zone, CONSTRAINT foo_pkey PRIMARY KEY (id) ); CREATE INDEX foo_date_to_index  ON foo  USING btree  (date_to) insert into foo (id, date_to) values (1, now()); insert into foo