Create table SQL PostgreSQL query

We know, create table statement exists in the form of a system,
In PG, create the SQL statement table should be how to query?
Query the SQL statement to create a view can be through
  1. select definition from pg_views;
The SQL statement can be obtained, then create table and how to get it?

Started by Maxine at February 03, 2016 - 10:39 PM

Create table, there is no local storage, to construct their own

Posted by Richard at February 16, 2016 - 10:52 PM

I mean, query the SQL statement to create table, should be able to check. I had checked. Only now can't remember.

Posted by Maxine at February 24, 2016 - 11:45 PM

Pgadmin has functions to achieve

No SQL statement data dictionary tables in the database record.

Posted by Richard at March 03, 2016 - 12:42 AM

Should have. I have checked. If you think not, PGAdmin3 and how to achieve it?

Posted by Maxine at March 09, 2016 - 1:03 AM

This is more complex, need to put together: find out the column definition / bound / index etc.
Pg_catalog there is no direct save original create table SQL.

You can use the pg_dump -s -t tablename dbname to get.

Posted by Nicole at March 12, 2016 - 1:58 AM

In 9.1 not in the table (view).

Posted by Maxine at March 19, 2016 - 2:28 AM

Pg_catalog I refer to table schema, related definitions are stored in a plurality of systems in the table, can have a look the pg_dump code is how to generate tables of SQL.

Posted by Nicole at March 22, 2016 - 2:48 AM

Ha-ha. Also see the source code.

Posted by Maxine at April 06, 2016 - 3:39 AM

You are a master, not Windows or GNOME or KDE or something.
You can use pgAdminIII connect to database. As shown in the figure.
But I want to ask PostgreSQL have similar SQL Server in the " event viewer; " like Dongdong??

untitled.JPG

Posted by Phoebe at April 13, 2016 - 4:17 AM

Thank you, top

Posted by Owen at January 02, 2017 - 8:47 PM

You can query the system information Function is there
Index is there

Posted by Thomas at January 03, 2017 - 8:55 PM

You find a way?

Posted by Antony at January 03, 2017 - 9:49 PM

Very thank you, next

Posted by Stuart at January 07, 2017 - 10:05 PM

Without this function in PG, pgadmin is also constructed.

Posted by Richard at January 10, 2017 - 10:09 PM