Re: R: R: space taken by a row & compressed data - Mailing list pgsql-general

From Joe Conway
Subject Re: R: R: space taken by a row & compressed data
Date
Msg-id 412F6F5A.9080004@joeconway.com
Whole thread Raw
In response to Re: R: R: space taken by a row & compressed data  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Joe Conway wrote:
> Greg Stark wrote:
>
>> How do you check to see how many records, or ideally which records,
>> are being
>> toasted and/or stored externally?
>>
> I don't know of a builtin way to do that from SQL, but the attached
> seems to work for me.
>

FWIW, this version has a bit more robust type checking. The last one
would crash if passed a non-varlena column.

regression=# \d foo
       Table "public.foo"
  Column |  Type   | Modifiers
--------+---------+-----------
  f1     | integer |
  f2     | text    |

regression=# select checktoast(f1), checktoast(f2) from foo;
      checktoast      |     checktoast
---------------------+---------------------
  inline,uncompressed | inline,uncompressed
  inline,uncompressed | inline,compressed
(2 rows)


Joe

Attachment

pgsql-general by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: performance of IN (subquery)
Next
From: Duane Lee - EGOVX
Date:
Subject: Re: performance of IN (subquery)