Re: Getting all entries in a single block with ctid - Mailing list pgsql-general

From Tomas Vondra
Subject Re: Getting all entries in a single block with ctid
Date
Msg-id 257a7802c5cbb4538bf45ccffa92edd5.squirrel@sq.gransy.com
Whole thread Raw
In response to Getting all entries in a single block with ctid  (Tore Halvorsen <tore.halvorsen@gmail.com>)
Responses Re: Getting all entries in a single block with ctid  (Tore Halvorsen <tore.halvorsen@gmail.com>)
List pgsql-general
On 16 Leden 2012, 15:07, Tore Halvorsen wrote:
> Hi,
>
> As I understand it, the ctid contains both the block number and an index
> is
> this block.
> Is there a way to fetch all the table entries from the same block?
>
> E.g. something like this:
>
> select * from foo where ctid like '(123,%'
>
> or ... ctid.block = 123

WHERE ctid >= '(123,0)'::tid AND ctid < '(124,0)'::tid


Tomas


pgsql-general by date:

Previous
From: Tore Halvorsen
Date:
Subject: Getting all entries in a single block with ctid
Next
From: Tore Halvorsen
Date:
Subject: Re: Getting all entries in a single block with ctid