aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-02-11 21:11:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-02-11 21:11:16 +0000
commit6d1e36185208d04c72d4550c5b02f6f282c9db4f (patch)
tree365b8478fbfc0e6a3fd27213e9985bd40b0f9332 /src/include
parent68d95f12e72804068e47cda469a7e7cbc1df174d (diff)
downloadpostgresql-6d1e36185208d04c72d4550c5b02f6f282c9db4f.tar.gz
postgresql-6d1e36185208d04c72d4550c5b02f6f282c9db4f.zip
Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physically
get rid of the OID column. This eliminates the problem discovered by Heikki back in November that 8.4's suppression of "unnecessary" junk filtering in INSERT/SELECT could lead to an Assert failure, or storing of oids into a table that shouldn't have them if Asserts are off. While that particular problem could have been solved in other ways, it seems likely to be just a forerunner of things to come if we continue to allow tables to contain rows that disagree with the pg_class.relhasoids setting. It's better to make this operation slow than to sacrifice performance or risk bugs in more common code paths. Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids. This was a bit more controversial, but in view of the very small amount of extra code needed given the current ALTER TABLE infrastructure, it seems best to eliminate the asymmetry in features.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/parsenodes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 7523982662d..23ffaabb4e1 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.390 2009/02/02 19:31:40 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.391 2009/02/11 21:11:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1127,6 +1127,7 @@ typedef enum AlterTableType
AT_ChangeOwner, /* change owner */
AT_ClusterOn, /* CLUSTER ON */
AT_DropCluster, /* SET WITHOUT CLUSTER */
+ AT_AddOids, /* SET WITH OIDS */
AT_DropOids, /* SET WITHOUT OIDS */
AT_SetTableSpace, /* SET TABLESPACE */
AT_SetRelOptions, /* SET (...) -- AM specific parameters */