Skip to content

Instantly share code, notes, and snippets.

@bruno-uy
Created May 27, 2022 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruno-uy/685d8203e758c02c7df0d7d18f8b7f9b to your computer and use it in GitHub Desktop.
Save bruno-uy/685d8203e758c02c7df0d7d18f8b7f9b to your computer and use it in GitHub Desktop.
Table not showing up when querying PG_TABLE_DEF
-- Problem: you don't see all the schemas when querying PG_TABLE_DEF
-- Solution:
-- 1. First check if the schema you're trying to query is on the search path
show search_path;
-- 2. Add the missing one(s) to the search path (imagine the result was only public and you're missing data_warehouse and matching)
set search_path to '$user', public, data_warehouse, matching; -- No matter which is your user, use '$user'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment