The intention of this SQL file is to generate a text output of the full DDL used to generate a postgres table, based on a database schema and table name.
The script is based on prior work posted on StackOverflow, but extends it to add additional elements and formatting.
The output of the function for a table in the Neotoma Paleoecology Database using the statement:
SELECT * FROM get_table_definition('ap', 'faunranges');