Implement IMPORT FOREIGN SCHEMA.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Jul 2014 19:01:31 +0000 (15:01 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Jul 2014 19:01:43 +0000 (15:01 -0400)
commit59efda3e50ca4de6a9d5aa4491464e22b6329b1e
tree23a2fe16ebc11ad9f95ef3f70c563084d6ca4007
parent6a605cd6bd9f689b35676623add0de9b90978bf1
Implement IMPORT FOREIGN SCHEMA.

This command provides an automated way to create foreign table definitions
that match remote tables, thereby reducing tedium and chances for error.
In this patch, we provide the necessary core-server infrastructure and
implement the feature fully in the postgres_fdw foreign-data wrapper.
Other wrappers will throw a "feature not supported" error until/unless
they are updated.

Ronan Dunklau and Michael Paquier, additional work by me
29 files changed:
contrib/postgres_fdw/deparse.c
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/postgres_fdw.h
contrib/postgres_fdw/sql/postgres_fdw.sql
doc/src/sgml/ddl.sgml
doc/src/sgml/event-trigger.sgml
doc/src/sgml/fdwhandler.sgml
doc/src/sgml/postgres-fdw.sgml
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/create_foreign_table.sgml
doc/src/sgml/ref/import_foreign_schema.sgml [new file with mode: 0644]
doc/src/sgml/reference.sgml
src/backend/commands/event_trigger.c
src/backend/commands/foreigncmds.c
src/backend/foreign/foreign.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/bin/psql/tab-complete.c
src/include/commands/defrem.h
src/include/foreign/fdwapi.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/parser/kwlist.h
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql