Addition to TOAST documentation in 8.4 comprehensive manual

Поиск
Список
Период
Сортировка
От Aleksey Tsalolikhin
Тема Addition to TOAST documentation in 8.4 comprehensive manual
Дата
Msg-id AANLkTikYArVJ0L_i9-VavbxB8iwB75yQ_wO=h1GswdUu@mail.gmail.com
обсуждение исходный текст
Ответы Re: Addition to TOAST documentation in 8.4 comprehensive manual
Список pgsql-docs
Hello,

  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?

Sincerely,
Aleksey

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;
 regclass
----------
 monkeys
(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"
http://www.postgresql.org/docs/8.4/static/datatype-oid.html

В списке pgsql-docs по дате отправления:

Предыдущее
От: Leslie S Satenstein
Дата:
Сообщение: OID
Следующее
От: Aleksey Tsalolikhin
Дата:
Сообщение: Re: Addition to TOAST documentation in 8.4 comprehensive manual