Re: Getting all entries in a single block with ctid

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Tore Halvorsen" <tore(dot)halvorsen(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting all entries in a single block with ctid
Date: 2012-01-16 14:20:21
Message-ID: 257a7802c5cbb4538bf45ccffa92edd5.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tore Halvorsen 2012-01-16 14:28:21 Re: Getting all entries in a single block with ctid
Previous Message Tore Halvorsen 2012-01-16 14:07:54 Getting all entries in a single block with ctid