pgsql: Include typmod when complaining about inherited column type mism
| От | Tom Lane |
|---|---|
| Тема | pgsql: Include typmod when complaining about inherited column type mism |
| Дата | |
| Msg-id | E1aCtmx-00069D-SK@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Include typmod when complaining about inherited column type mismatches. MergeAttributes() rejects cases where columns to be merged have the same type but different typmod, which is correct; but the error message it printed didn't show either typmod, which is unhelpful. Changing this requires using format_type_with_typemod() in place of TypeNameToString(), which will have some minor side effects on the way some type names are printed, but on balance this is an improvement: the old code sometimes printed one type according to one set of rules and the other type according to the other set, which could be confusing in its own way. Oddly, there were no regression test cases covering any of this behavior, so add some. Complaint and fix by Amit Langote Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/fec1ad94dfc5ddacfda8d249bf4b3c739da8f7a1 Modified Files -------------- src/backend/commands/tablecmds.c | 12 ++++++++---- src/test/regress/expected/alter_table.out | 21 +++++++++++++++++++++ src/test/regress/sql/alter_table.sql | 11 +++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-)
В списке pgsql-committers по дате отправления: