Created
May 27, 2022 12:29
-
-
Save bruno-uy/685d8203e758c02c7df0d7d18f8b7f9b to your computer and use it in GitHub Desktop.
Table not showing up when querying PG_TABLE_DEF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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