Skip site navigation (1) Skip section navigation (2)

pgsql: Don't allow CREATE TABLE AS to create a column with invalidcoll

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't allow CREATE TABLE AS to create a column with invalidcoll
Date: 2011-03-04 21:43:03
Message-ID: E1Pvcm7-0004lC-R8@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b9cff97fdf486eca7e563a9696a7391048814d0f

Modified Files
--------------
src/backend/catalog/heap.c                       |   17 +++++++++++++++--
src/backend/catalog/index.c                      |    8 +++++---
src/backend/commands/tablecmds.c                 |    4 ++--
src/include/catalog/heap.h                       |    2 +-
src/test/regress/expected/collate.linux.utf8.out |    3 +++
src/test/regress/sql/collate.linux.utf8.sql      |    2 ++
6 files changed, 28 insertions(+), 8 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2011-03-04 22:28:36
Subject: pgsql: Refactor seclabel.c to use the new check_object_ownershipfuncti
Previous:From: Tom LaneDate: 2011-03-04 21:09:07
Subject: pgsql: Allow non-superusers to create (some) extensions.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group