On Tue, Sep 21, 2010 at 11:42 PM, Pei He <hepeimail@gmail.com> wrote:
> Hi,
> In ctid, there are the block num, and the tuple offset inside the block.
>
> How can I know the maximum number of tuples in a block?
> The block size would be BLCKSZ.
See MaxHeapTuplesPerPage and MaxIndexTuplesPerPage.
> I am not quite sure where is the best place to find the size of the tuple in
> a table.
You might want to look at contrib/pageinspect. See also PageGetItemId
and ItemIdGetLength.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company