diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-12-16 18:39:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-12-16 18:39:22 +0000 |
commit | 260faf0b633716d02e30103bd5e94eb40f06bf27 (patch) | |
tree | 578a60809421acd51066b5290fc3be05b778cb9e /src/include | |
parent | 88177f77b17ef478da1dbca9acb5e3a61b346613 (diff) | |
download | postgresql-260faf0b633716d02e30103bd5e94eb40f06bf27.tar.gz postgresql-260faf0b633716d02e30103bd5e94eb40f06bf27.zip |
Fix ALTER TABLE ADD COLUMN to disallow the same column types that are
disallowed by CREATE TABLE (eg, pseudo-types); also disallow these types
from being introduced by the range-function syntax. While at it, allow
CREATE TABLE to create zero-column tables, per recent pghackers discussion.
I am back-patching this into 7.3 since failure to disallow pseudo-types
is arguably a security hole.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/heap.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 677347c24f5..1a69f0147ff 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: heap.h,v 1.59 2002/11/11 22:19:23 tgl Exp $ + * $Id: heap.h,v 1.60 2002/12/16 18:39:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,4 +74,8 @@ extern Form_pg_attribute SystemAttributeDefinition(AttrNumber attno, extern Form_pg_attribute SystemAttributeByName(const char *attname, bool relhasoids); +extern void CheckAttributeNamesTypes(TupleDesc tupdesc, char relkind); + +extern void CheckAttributeType(const char *attname, Oid atttypid); + #endif /* HEAP_H */ |