Is there a way to copy the structure of a table into a new table, without data, including all keys and constraints?
Take a look at pgAdmin - by far the easiest way to do what you want. Right-click on table, Scripts - Create.