Fix contrib/postgres_fdw's handling of column defaults.
Tom Lane <tgl@sss.pgh.pa.us>
Fix contrib/postgres_fdw's handling of column defaults. Adopt the position that only locally-defined defaults matter. Any defaults defined in the remote database do not affect insertions performed through a foreign table (unless they are for columns not known to the foreign table). While it'd arguably be more useful to permit remote defaults to be used, making that work in a consistent fashion requires far more work than seems possible for 9.3.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/postgres_fdw/deparse.c | modified | +17 −38 |
| contrib/postgres_fdw/expected/postgres_fdw.out | modified | +142 −143 |
| contrib/postgres_fdw/postgres_fdw.c | modified | +33 −10 |
| contrib/postgres_fdw/postgres_fdw.h | modified | +6 −3 |
| contrib/postgres_fdw/sql/postgres_fdw.sql | modified | +7 −8 |