pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: suvisor.root@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6607: Strange select behavior
Date: Sun, 22 Apr 2012 19:17:39 +0000
Message-ID: <E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      6607
Logged by:          Sheplyakov Alexander
Email address:      suvisor.root@gmail.com
PostgreSQL version: 9.1.3
Operating system:   Debian GNU/Linux Wheezy kernel ver 3.3.1
Description:        

Create test table in such manner:
create table testt (id serial PRIMARY KEY, val text not null);
Populate table with test data:
 insert into testt (val) values ('1'), ('2'), ('3'), ('4'), ('5'), ('6'),
('7'), ('8'), ('9');
(repeat next line until table doesn't contain approx 1000000 rows)
insert into testt (id, val) select nextval('testt_id_seq'::regclass),
currval('testt_id_seq'::regclass) + val::integer from testt;

And then, repeat some times such query:
select * from testt where id = (random()* 100000)::integer;

And sometimes it comes out something like this:
id | val
-------+--------
11894 | 15051
29233 | 42198
80725 | 90213
85688 | 100992
88017 | 108075
(5 rows)
Here can be 2, 3 or other rows amount in result... But must be only one!




view thread (4+ messages)  latest in thread

Message-ID: <E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org>
Permalink:  ../E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: suvisor.root@gmail.com
  Subject: Re: BUG #6607: Strange select behavior
  In-Reply-To: <E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org>
  References: <E1SM2Hz-0000Ox-PP@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox