Skip to content

Instantly share code, notes, and snippets.

@jcoleman
Created February 1, 2019 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jcoleman/67687738c11f1f5ba8a04a7198d92715 to your computer and use it in GitHub Desktop.
Save jcoleman/67687738c11f1f5ba8a04a7198d92715 to your computer and use it in GitHub Desktop.
SELECT
relname,
relfilenode
FROM pg_catalog.pg_class
WHERE relname in (
'<table>',
'<index>'
)
-- Order by oid for convenience if you're checking multiple relations.
ORDER BY oid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment