The sql can be predigest to:
select random() from a where random()<0.5;
\d a
Table "public.a"
Column | Type | Modifiers
+-+---
a | integer |
This query can get about a half rows in the table 'a'.
When search a row, postgresql calcuate random() twice.
1.
The oid may overlap; Insert may fail if i create a
primary key on the oid column(Thank Richard Huxton and
Michael Glaesemann). So I can't locate the record I
Insert by the oid obtained by PQoidValue.
Then, PQoidValue have no use?
2.
I can use currtid2 to get the ctid after Delete. But
in this m