Don't allow CREATE TABLE AS to create a column with invalid collation
Peter Eisentraut <peter_e@gmx.net>
Don't allow CREATE TABLE AS to create a column with invalid collation It is possible that an expression ends up with a collatable type but without a collation. CREATE TABLE AS could then create a table based on that. But such a column cannot be dumped with valid SQL syntax, so we disallow creating such a column. per test report from Noah Misch
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/heap.c | modified | +15 −2 |
| src/backend/catalog/index.c | modified | +5 −3 |
| src/backend/commands/tablecmds.c | modified | +2 −2 |
| src/include/catalog/heap.h | modified | +1 −1 |
| src/test/regress/expected/collate.linux.utf8.out | modified | +3 −0 |
| src/test/regress/sql/collate.linux.utf8.sql | modified | +2 −0 |