From aafe72efb2d9a01db77bacf94b9b103042b5eb60 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 27 Apr 2002 03:04:08 +0000 Subject: Update DROP COLUMN example to use transactions and rollback-able DROP TABLE> --- doc/src/FAQ/FAQ.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/src/FAQ/FAQ.html') diff --git a/doc/src/FAQ/FAQ.html b/doc/src/FAQ/FAQ.html index 8f0dbb11bbc..988aa3f968f 100644 --- a/doc/src/FAQ/FAQ.html +++ b/doc/src/FAQ/FAQ.html @@ -14,7 +14,7 @@ alink="#0000ff">

Frequently Asked Questions (FAQ) for PostgreSQL

-

Last updated: Thu Apr 18 00:44:51 EDT 2002

+

Last updated: Fri Apr 26 23:03:46 EDT 2002

Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@@ -827,11 +827,14 @@

We do not support ALTER TABLE DROP COLUMN, but do this:

+    BEGIN;
+    LOCK TABLE old_table;
     SELECT ...  -- select all columns but the one you want to remove
     INTO TABLE new_table
     FROM old_table;
     DROP TABLE old_table;
     ALTER TABLE new_table RENAME TO old_table;
+    COMMIT;
 

4.5) What is the maximum size for a row, a -- cgit v1.2.3