I need to find all the visible tables in my current schema search path. I tried:
SELECT *
FROM pg_tables
AND schemaname IN (SHOW search_path)
but it errors with:
PGError: ERROR: syntax error at or near "search_path"
LINE 3: AND schemaname IN (SHOW search_path)
The
pg_*_is_visible()set of functions is provided for this purpose. Here is one way to use them: