OSDN Git Service

Tighten ALTER FOREIGN TABLE .. SET DATA TYPE checks.
authorRobert Haas <rhaas@postgresql.org>
Sun, 6 Feb 2011 05:26:27 +0000 (00:26 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sun, 6 Feb 2011 05:26:27 +0000 (00:26 -0500)
commit65377e0b9c0e0397b1598b38b6a7fb8b6f740d39
treeb4ad4ca72227fa6d8c145eaeb42cbf7b50214970
parent51dbc87dff5c32bfe627ec7b22c575c263de8251
Tighten ALTER FOREIGN TABLE .. SET DATA TYPE checks.

If the foreign table's rowtype is being used as the type of a column in
another table, we can't just up and change its data type.  This was
already checked for composite types and ordinary tables, but we
previously failed to enforce it for foreign tables.
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/include/commands/tablecmds.h
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql