How can I generate the DDL of a table programmatically on Postgresql? Is there a system query or command to do it? Googling the issue returned no pointers.
Here is a good article on how to get the meta information from information schema, http://www.alberton.info/postgresql_meta_info.html.