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