Skip site navigation (1) Skip section navigation (2)

Addition to TOAST documentation in 8.4 comprehensive manual

From: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Addition to TOAST documentation in 8.4 comprehensive manual
Date: 2010-12-23 01:46:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs

  I'd like to suggest a small addition to the TOAST overview in the
8.4 comprehensive manual, Chapter 53.2 TOAST.

  This is my first doc patch for postgres, so if this is not
appropriate, please advise.  I spent almost an hour trying to figure
out how to go from the TOAST table id to the owning table name...
finally got help on #postgresql.   Thought I'd document it for other
sys admins new to PostgreSQL.

  Or is this something that would be better to go into the PostgreSQL Wiki?


To find the parent table given a TOAST table, which has a name like
pg_toast_12513885, cast the OID of the toast table to "regclass".

For example:  Given "monkeys" table which spills over to pg_toast_12513885:

select 12513885::regclass;
(1 row)

"regclass" stands for registered "class".  Per RhodiumToad on #postgresql,
for reasons too complicated to explain, "class" is used to mean "relation".

Reference: "casting a table's OID to regclass is handy for symbolic
display of a numeric OID"


pgsql-docs by date

Next:From: Aleksey TsalolikhinDate: 2010-12-23 02:05:22
Subject: Re: Addition to TOAST documentation in 8.4 comprehensive manual
Previous:From: Leslie S SatensteinDate: 2010-12-22 23:30:16
Subject: OID

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group