This is a small fix in FAQ. It just clean up some old comments and
authorBruce Momjian
Fri, 4 Jun 2004 04:09:40 +0000 (04:09 +0000)
committerBruce Momjian
Fri, 4 Jun 2004 04:09:40 +0000 (04:09 +0000)
change an old -not-working piece of code.

doc/FAQ
doc/src/FAQ/FAQ.html

diff --git a/doc/FAQ b/doc/FAQ
index 4bdea83d1196c964da07bf5a832fe769efb99009..292775503486a2139039f81dae3fa8a3dc873321 100644 (file)
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
 
                 Frequently Asked Questions (FAQ) for PostgreSQL
                                        
-   Last updated: Mon Mar 29 00:07:11 EST 2004
+   Last updated: Fri Jun 4 00:09:16 EDT 2004
    
    Current maintainer: Bruce Momjian ([email protected])
    
@@ -965,11 +965,11 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
    all databases. If you want to change the OID to something else, or if
    you want to make a copy of the table, with the original OIDs, there is
    no reason you can't do it:
-        CREATE TABLE new_table(old_oid oid, mycol int);
-        SELECT old_oid, mycol INTO new FROM old;
-        COPY new TO '/tmp/pgtable';
-        DELETE FROM new;
-        COPY new WITH OIDS FROM '/tmp/pgtable';
+        CREATE TABLE new_table(mycol int);
+        SELECT oid AS old_oid, mycol INTO tmp_table FROM old_table;
+        COPY tmp_table TO '/tmp/pgtable';
+        COPY new_table WITH OIDS FROM '/tmp/pgtable';
+        DROP TABLE tmp_table;
 
    OIDs are stored as 4-byte integers, and will overflow at 4 billion. No
    one has reported this ever happening, and we plan to have the limit
index 326705ef806b33dd736daf6309452201e51f9446..8710360609dae18e2df3cfa27d3f9e871d1964f5 100644 (file)
@@ -10,7 +10,7 @@
   alink="#0000ff">
     

Frequently Asked Questions (FAQ) for PostgreSQL

 
-    

Last updated: Thu May  6 10:22:34 EDT 2004

+    

Last updated: Fri Jun  4 00:09:16 EDT 2004

 
     

Current maintainer: Bruce Momjian (

@@ -1213,16 +1213,12 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
     of the table, with the original OIDs, there is no
     reason you can't do it:

 
-        CREATE TABLE new_table(old_oid oid, mycol int);
-        SELECT old_oid, mycol INTO new FROM old;
-        COPY new TO '/tmp/pgtable';
-        DELETE FROM new;
-        COPY new WITH OIDS FROM '/tmp/pgtable';
+        CREATE TABLE new_table(mycol int);
+        SELECT oid AS old_oid, mycol INTO tmp_table FROM old_table;
+        COPY tmp_table TO '/tmp/pgtable';
+        COPY new_table WITH OIDS FROM '/tmp/pgtable';
+        DROP TABLE tmp_table;
 
-
     

OIDs are stored as 4-byte integers, and will

     overflow at 4 billion. No one has reported this ever happening, and
     we plan to have the limit removed before anyone does.