Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit768916d

Browse files
committed
This is a small fix in FAQ. It just clean up some old comments and
change an old -not-working piece of code.
1 parentbf2a115 commit768916d

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

‎doc/FAQ

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated:Mon Mar 29 00:07:11 EST 2004
4+
Last updated:Fri Jun 4 00:09:16 EDT 2004
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -965,11 +965,11 @@ BYTEA bytea variable-length byte array (null-byte safe)
965965
all databases. If you want to change the OID to something else, or if
966966
you want to make a copy of the table, with the original OIDs, there is
967967
no reason you can't do it:
968-
CREATE TABLE new_table(old_oid oid,mycol int);
969-
SELECT old_oid, mycol INTOnew FROMold;
970-
COPYnew TO '/tmp/pgtable';
971-
DELETEFROMnew;
972-
COPY new WITH OIDS FROM '/tmp/pgtable';
968+
CREATE TABLE new_table(mycol int);
969+
SELECToid ASold_oid, mycol INTOtmp_table FROMold_table;
970+
COPYtmp_table TO '/tmp/pgtable';
971+
COPY new_table WITH OIDSFROM'/tmp/pgtable';
972+
DROP TABLE tmp_table;
973973

974974
OIDs are stored as 4-byte integers, and will overflow at 4 billion. No
975975
one has reported this ever happening, and we plan to have the limit

‎doc/src/FAQ/FAQ.html

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
alink="#0000ff">
1111
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1212

13-
<P>Last updated:Thu May 6 10:22:34 EDT 2004</P>
13+
<P>Last updated:Fri Jun 4 00:09:16 EDT 2004</P>
1414

1515
<P>Current maintainer: Bruce Momjian (<Ahref=
1616
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
@@ -1213,16 +1213,12 @@ <H4><A name="4.16">4.16</A>) What is an <SMALL>OID</SMALL>? What is
12131213
of the table, with the original<SMALL>OID</SMALL>s, there is no
12141214
reason you can't do it:</P>
12151215
<PRE>
1216-
CREATE TABLE new_table(old_oid oid,mycol int);
1217-
SELECT old_oid, mycol INTOnew FROMold;
1218-
COPYnew TO '/tmp/pgtable';
1219-
DELETEFROMnew;
1220-
COPY new WITH OIDS FROM '/tmp/pgtable';
1216+
CREATE TABLE new_table(mycol int);
1217+
SELECToid ASold_oid, mycol INTOtmp_table FROMold_table;
1218+
COPYtmp_table TO '/tmp/pgtable';
1219+
COPY new_table WITH OIDSFROM'/tmp/pgtable';
1220+
DROP TABLE tmp_table;
12211221
</PRE>
1222-
<!--
1223-
CREATE TABLE new_table (mycol int);
1224-
INSERT INTO new_table (oid, mycol) SELECT oid, mycol FROM old_table;
1225-
-->
12261222
<P>O<SMALL>ID</SMALL>s are stored as 4-byte integers, and will
12271223
overflow at 4 billion. No one has reported this ever happening, and
12281224
we plan to have the limit removed before anyone does.</P>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp