'Why are my tables not listed in the Redshift pg_table_def system table?

So I have created some tables:

enter image description here

But they are not listed when I query pg_table_def? Any ideas appreciated.

enter image description here



Solution 1:[1]

"For modifying the search path permanently on your cluster , please modify the search_path parameter in the parameter group that is currently associated with your cluster. For step by step instructions please refer to the link below :-

http://docs.aws.amazon.com/redshift/latest/mgmt/managing-parameter-groups-console.html "

https://forums.aws.amazon.com/thread.jspa?threadID=131150

Solution 2:[2]

This is old, but in case there is anyone like me looking for the straight answer on the command line:

Set the search_path parameter to include the schemas you want. For a single session, it's SET search_path TO my_schema, my_second_schema [...] for as many schemas as you like. To set the search path permanently for one user, it's ALTER USER my_user SET search_path TO my_schema, my_second_schema [...].

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jon Ekiz
Solution 2 AdagioMolto