*** FAQ.html.orig 2004-05-22 14:47:44.000000000 -0300 --- FAQ.html 2004-05-31 12:34:03.000000000 -0300 *************** *** 1213,1228 **** 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';
  
-

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.

--- 1213,1224 ---- of the table, with the original OIDs, there is no reason you can't do it:

!         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.