I tried to get the query of an existing table in PostgreSQL database using DBeaver IDE. Query which was used to create the table and its relationships, constrains and indexes.
I tried mentioned below 4 queries but those are not working
pg_dump --table metal_products --schema-only
select view_definition from information_schema.tables where table_name = 'metal_products';
select definition from pg_tables where tablename = 'metal_products'
pg_dump -t 'schema-name.metal_products' --schema-only database-name
/+d metal_products
These are not working. How can I do that ?