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

Re: SELECT returning too many rows (?) [7.4.2]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rob <rob(at)dsvr(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: SELECT returning too many rows (?) [7.4.2]
Date: 2005-02-08 16:14:00
Message-ID: 6989.1107879240@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
rob <rob(at)dsvr(dot)net> writes:
> I believe there to be one row stored, which is the reason why the
> constraints on the primary key (id) were met, and that for reasons as
> yet unknown a select returns three rows.

Just for the record: you do have three physical rows.  The reason a
select on the primary key returns only one is that Postgres "knows"
a unique index can only return one hit for a given key, and so it stops
the indexscan after getting the first result.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: robfDate: 2005-02-08 16:41:51
Subject: Re: SELECT returning too many rows (?)
Previous:From: Tom LaneDate: 2005-02-08 16:12:30
Subject: Re: SELECT returning too many rows (?)

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