aboutsummaryrefslogtreecommitdiff
path: root/doc/FAQ
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-04-27 03:04:08 +0000
committerBruce Momjian <bruce@momjian.us>2002-04-27 03:04:08 +0000
commitaafe72efb2d9a01db77bacf94b9b103042b5eb60 (patch)
tree9394f93fe4b151a10e325576913b581eb08cdbc2 /doc/FAQ
parent97b6e3f06f89cbc92f459089f34ca39818cfc20f (diff)
downloadpostgresql-aafe72efb2d9a01db77bacf94b9b103042b5eb60.tar.gz
postgresql-aafe72efb2d9a01db77bacf94b9b103042b5eb60.zip
Update DROP COLUMN example to use transactions and rollback-able DROP TABLE>
Diffstat (limited to 'doc/FAQ')
-rw-r--r--doc/FAQ5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/FAQ b/doc/FAQ
index 791cfbd9d37..2c4193a833d 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
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)
@@ -637,11 +637,14 @@
4.4) How do you remove a column from a table?
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 table, and a database?