As I am creating a repository of the project, I need all the "create statements" of every table in a particular schema. I have tried using:
SELECT *
FROM pg_table_def
WHERE schemaname = 'public'
ORDER BY tablename;
But this doesn't suffice as it does not give me the create statement.