Steve Rogerson <steve.pg@yewtc.demon.co.uk> writes:
> Why does the plan come up with 67 rows, when by definition there can be at
> most one as we are searching on the pk?
The rowcount estimate is made by combining selectivities of the WHERE
conditions; what you're seeing is a consequence of not having very good
knowledge about cross-column correlations. The actual details of the plan
(ie, that the pkey index can be used) are determined much later.
regards, tom lane