pgsql: Allow default expressions to be attached to columns of foreign t
От | Tom Lane |
---|---|
Тема | pgsql: Allow default expressions to be attached to columns of foreign t |
Дата | |
Msg-id | E1UFWst-0005Sc-Sw@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Allow default expressions to be attached to columns of foreign tables. There's still some discussion about exactly how postgres_fdw ought to handle this case, but there seems no debate that we want to allow defaults to be used for inserts into foreign tables. So remove the core-code restrictions that prevented it. While at it, get rid of the special grammar productions for CREATE FOREIGN TABLE, and instead add explicit FEATURE_NOT_SUPPORTED error checks for the disallowed cases. This makes the grammar a shade smaller, and more importantly results in much more intelligible error messages for unsupported cases. It's also one less thing to fix if we ever start supporting constraints on foreign tables. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a0c6dfeecfcc860858b04617a9d96eaee1d82c66 Modified Files -------------- doc/src/sgml/ref/alter_foreign_table.sgml | 19 +++++++++- doc/src/sgml/ref/create_foreign_table.sgml | 31 ++++++++++++++- src/backend/commands/tablecmds.c | 14 +------ src/backend/parser/gram.y | 38 ++++-------------- src/backend/parser/parse_utilcmd.c | 57 +++++++++++++++++++++++++-- src/test/regress/expected/foreign_data.out | 21 +++++----- src/test/regress/sql/foreign_data.sql | 7 +-- 7 files changed, 123 insertions(+), 64 deletions(-)
В списке pgsql-committers по дате отправления: