Skip to content

Instantly share code, notes, and snippets.

@GraphBear
Created August 27, 2020 16:12
Show Gist options
  • Save GraphBear/2a9c9454f0ebe9696af6878fde92a8c1 to your computer and use it in GitHub Desktop.
Save GraphBear/2a9c9454f0ebe9696af6878fde92a8c1 to your computer and use it in GitHub Desktop.
find parent table of a toast table in postgresql
select
relname
from
pg_class
where
reltoastrelid = ( select oid from pg_class where relname = 'toast_table_name' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment