Skip to content

Commit de6f613

Browse files
committed
moved migration files
1 parent a6ae2ae commit de6f613

File tree

4 files changed

+334
-0
lines changed

4 files changed

+334
-0
lines changed

MIGRATION/1.02_to_1.02.1

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From scrappy@ki.net Wed Aug 14 20:41:08 1996
2+
Status: RO
3+
X-Status:
4+
Received: from candle.pha.pa.us (maillist@s1-03.ppp.op.net [206.84.209.132]) by quagmire.ki.net (8.7.5/8.7.5) with ESMTP id UAA01234 for <scrappy@ki.net>; Wed, 14 Aug 1996 20:41:00 -0400 (EDT)
5+
Received: (from maillist@localhost) by candle.pha.pa.us (8.7.4/8.7.3) id UAA13966 for scrappy@ki.net; Wed, 14 Aug 1996 20:40:48 -0400 (EDT)
6+
From: Bruce Momjian <maillist@candle.pha.pa.us>
7+
Message-Id: <199608150040.UAA13966@candle.pha.pa.us>
8+
Subject: New migration file
9+
To: scrappy@ki.net (Marc G. Fournier)
10+
Date: Wed, 14 Aug 1996 20:40:47 -0400 (EDT)
11+
X-Mailer: ELM [version 2.4 PL25]
12+
MIME-Version: 1.0
13+
Content-Type: text/plain; charset=US-ASCII
14+
Content-Transfer-Encoding: 7bit
15+
16+
Here is a new migratoin file for 1.02.1. It includes the 'copy' change
17+
and a script to convert old ascii files.
18+
19+
---------------------------------------------------------------------------
20+
21+
The following notes are for the benefit of users who want to migrate
22+
databases from postgres95 1.01 and 1.02 to postgres95 1.02.1.
23+
24+
If you are starting afresh with postgres95 1.02.1 and do not need
25+
to migrate old databases, you do not need to read any further.
26+
27+
----------------------------------------------------------------------
28+
29+
In order to upgrade older postgres95 version 1.01 or 1.02 databases to
30+
version 1.02.1, the following steps are required:
31+
32+
1) start up a new 1.02.1 postmaster
33+
34+
2) Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02
35+
databases. This is done by running the new 1.02.1 server against
36+
your own 1.01 or 1.02 database and applying the queries attached at
37+
the end of thie file. This can be done easily through psql. If your
38+
1.01 or 1.02 database is named "testdb" and you have cut the commands
39+
from the end of this file and saved them in addfunc.sql:
40+
41+
% psql testdb -f addfunc.sql
42+
43+
Those upgrading 1.02 databases will get a warning when executing the
44+
last two statements because they are already present in 1.02. This is
45+
not a cause for concern.
46+
47+
* * *
48+
49+
If you are trying to reload a pg_dump or text-mode 'copy tablename to
50+
stdout' generated with a previous version, you will need to run the
51+
attached sed script on the ASCII file before loading it into the
52+
database. The old format used '.' as end-of-data, while '\.' is now the
53+
end-of-data marker. Also, empty strings are now loaded in as '' rather
54+
than NULL. See the copy manual page for full details.
55+
56+
sed 's/^\.$/\\./g' <in_file >out_file
57+
58+
If you are loading an older binary copy or non-stdout copy, there is no
59+
end-of-data character, and hence no conversion necessary.
60+
61+
---------------------------------------------------------------------------
62+
63+
-- following lines added by agc to reflect the case-insensitive
64+
-- regexp searching for varchar (in 1.02), and bpchar (in 1.02.1)
65+
create operator ~* (leftarg = bpchar, rightarg = text, procedure = texticregexeq);
66+
create operator !~* (leftarg = bpchar, rightarg = text, procedure = texticregexne);
67+
create operator ~* (leftarg = varchar, rightarg = text, procedure = texticregexeq);
68+
create operator !~* (leftarg = varchar, rightarg = text, procedure = texticregexne);
69+
70+
71+
72+
73+

MIGRATION/1.0_to_1.01

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
The following notes are for the benefit of users who want to migrate
2+
databases from postgres95 1.0 to postgres95 1.01.
3+
4+
If you are starting afresh with postgres95 1.01 and do not need
5+
to migrate old databases, you do not need to read any further.
6+
7+
----------------------------------------------------------------------
8+
9+
In order to postgres95 version 1.01 with databases created with
10+
postgres95 version 1.0, the following steps are required:
11+
12+
1) Set the definition of NAMEDATALEN in src/Makefile.global to 16
13+
and OIDNAMELEN to 20.
14+
15+
2) Decide whether you want to use Host based authentication.
16+
17+
A) If you do, you must create a file name "pg_hba" in your top-level data
18+
directory (typically the value of your $PGDATA). src/libpq/pg_hba
19+
shows an example syntax.
20+
21+
B) If you do not want host-based authentication, you can comment out
22+
the line
23+
HBA = 1
24+
in src/Makefile.global
25+
26+
Note that host-based authentication is turned on by default, and if
27+
you do not take steps A or B above, the out-of-the-box 1.01 will
28+
not allow you to connect to 1.0 databases.
29+
30+
3) compile and install 1.01, but DO NOT do the initdb step.
31+
32+
4) before doing anything else, terminate your 1.0 postmaster, and
33+
backup your existing $PGDATA directory.
34+
35+
5) set your PGDATA environment variable to your 1.0 databases, but set up
36+
path up so that 1.01 binaries are being used.
37+
38+
6) modify the file $PGDATA/PG_VERSION from 5.0 to 5.1
39+
40+
7) start up a new 1.01 postmaster
41+
42+
5) Add the new built-in functions and operators of 1.01 to 1.0
43+
databases. This is done by running the new 1.01 server against
44+
your own 1.0 database and applying the queries attached and saving
45+
in the file 1.0_to_1.01.sql. This can be done easily through psql.
46+
If your 1.0 database is name "testdb":
47+
48+
% psql testdb -f 1.0_to_1.01.sql
49+
50+
------------------------------------------------------------------------------
51+
-- add builtin functions that are new to 1.01
52+
53+
create function int4eqoid (int4, oid) returns bool as 'foo'
54+
language 'internal';
55+
create function oideqint4 (oid, int4) returns bool as 'foo'
56+
language 'internal';
57+
create function char2icregexeq (char2, text) returns bool as 'foo'
58+
language 'internal';
59+
create function char2icregexne (char2, text) returns bool as 'foo'
60+
language 'internal';
61+
create function char4icregexeq (char4, text) returns bool as 'foo'
62+
language 'internal';
63+
create function char4icregexne (char4, text) returns bool as 'foo'
64+
language 'internal';
65+
create function char8icregexeq (char8, text) returns bool as 'foo'
66+
language 'internal';
67+
create function char8icregexne (char8, text) returns bool as 'foo'
68+
language 'internal';
69+
create function char16icregexeq (char16, text) returns bool as 'foo'
70+
language 'internal';
71+
create function char16icregexne (char16, text) returns bool as 'foo'
72+
language 'internal';
73+
create function texticregexeq (text, text) returns bool as 'foo'
74+
language 'internal';
75+
create function texticregexne (text, text) returns bool as 'foo'
76+
language 'internal';
77+
78+
-- add builtin functions that are new to 1.01
79+
80+
create operator = (leftarg = int4, rightarg = oid, procedure = int4eqoid);
81+
create operator = (leftarg = oid, rightarg = int4, procedure = oideqint4);
82+
create operator ~* (leftarg = char2, rightarg = text, procedure = char2icregexeq);
83+
create operator !~* (leftarg = char2, rightarg = text, procedure = char2icregexne);
84+
create operator ~* (leftarg = char4, rightarg = text, procedure = char4icregexeq);
85+
create operator !~* (leftarg = char4, rightarg = text, procedure = char4icregexne);
86+
create operator ~* (leftarg = char8, rightarg = text, procedure = char8icregexeq);
87+
create operator !~* (leftarg = char8, rightarg = text, procedure = char8icregexne);
88+
create operator ~* (leftarg = char16, rightarg = text, procedure = char16icregexeq);
89+
create operator !~* (leftarg = char16, rightarg = text, procedure = char16icregexne);
90+
create operator ~* (leftarg = text, rightarg = text, procedure = texticregexeq);
91+
create operator !~* (leftarg = text, rightarg = text, procedure = texticregexne);
92+
93+
94+

migration/1.02_to_1.02.1

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From scrappy@ki.net Wed Aug 14 20:41:08 1996
2+
Status: RO
3+
X-Status:
4+
Received: from candle.pha.pa.us (maillist@s1-03.ppp.op.net [206.84.209.132]) by quagmire.ki.net (8.7.5/8.7.5) with ESMTP id UAA01234 for <scrappy@ki.net>; Wed, 14 Aug 1996 20:41:00 -0400 (EDT)
5+
Received: (from maillist@localhost) by candle.pha.pa.us (8.7.4/8.7.3) id UAA13966 for scrappy@ki.net; Wed, 14 Aug 1996 20:40:48 -0400 (EDT)
6+
From: Bruce Momjian <maillist@candle.pha.pa.us>
7+
Message-Id: <199608150040.UAA13966@candle.pha.pa.us>
8+
Subject: New migration file
9+
To: scrappy@ki.net (Marc G. Fournier)
10+
Date: Wed, 14 Aug 1996 20:40:47 -0400 (EDT)
11+
X-Mailer: ELM [version 2.4 PL25]
12+
MIME-Version: 1.0
13+
Content-Type: text/plain; charset=US-ASCII
14+
Content-Transfer-Encoding: 7bit
15+
16+
Here is a new migratoin file for 1.02.1. It includes the 'copy' change
17+
and a script to convert old ascii files.
18+
19+
---------------------------------------------------------------------------
20+
21+
The following notes are for the benefit of users who want to migrate
22+
databases from postgres95 1.01 and 1.02 to postgres95 1.02.1.
23+
24+
If you are starting afresh with postgres95 1.02.1 and do not need
25+
to migrate old databases, you do not need to read any further.
26+
27+
----------------------------------------------------------------------
28+
29+
In order to upgrade older postgres95 version 1.01 or 1.02 databases to
30+
version 1.02.1, the following steps are required:
31+
32+
1) start up a new 1.02.1 postmaster
33+
34+
2) Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02
35+
databases. This is done by running the new 1.02.1 server against
36+
your own 1.01 or 1.02 database and applying the queries attached at
37+
the end of thie file. This can be done easily through psql. If your
38+
1.01 or 1.02 database is named "testdb" and you have cut the commands
39+
from the end of this file and saved them in addfunc.sql:
40+
41+
% psql testdb -f addfunc.sql
42+
43+
Those upgrading 1.02 databases will get a warning when executing the
44+
last two statements because they are already present in 1.02. This is
45+
not a cause for concern.
46+
47+
* * *
48+
49+
If you are trying to reload a pg_dump or text-mode 'copy tablename to
50+
stdout' generated with a previous version, you will need to run the
51+
attached sed script on the ASCII file before loading it into the
52+
database. The old format used '.' as end-of-data, while '\.' is now the
53+
end-of-data marker. Also, empty strings are now loaded in as '' rather
54+
than NULL. See the copy manual page for full details.
55+
56+
sed 's/^\.$/\\./g' <in_file >out_file
57+
58+
If you are loading an older binary copy or non-stdout copy, there is no
59+
end-of-data character, and hence no conversion necessary.
60+
61+
---------------------------------------------------------------------------
62+
63+
-- following lines added by agc to reflect the case-insensitive
64+
-- regexp searching for varchar (in 1.02), and bpchar (in 1.02.1)
65+
create operator ~* (leftarg = bpchar, rightarg = text, procedure = texticregexeq);
66+
create operator !~* (leftarg = bpchar, rightarg = text, procedure = texticregexne);
67+
create operator ~* (leftarg = varchar, rightarg = text, procedure = texticregexeq);
68+
create operator !~* (leftarg = varchar, rightarg = text, procedure = texticregexne);
69+
70+
71+
72+
73+

migration/1.0_to_1.01

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
The following notes are for the benefit of users who want to migrate
2+
databases from postgres95 1.0 to postgres95 1.01.
3+
4+
If you are starting afresh with postgres95 1.01 and do not need
5+
to migrate old databases, you do not need to read any further.
6+
7+
----------------------------------------------------------------------
8+
9+
In order to postgres95 version 1.01 with databases created with
10+
postgres95 version 1.0, the following steps are required:
11+
12+
1) Set the definition of NAMEDATALEN in src/Makefile.global to 16
13+
and OIDNAMELEN to 20.
14+
15+
2) Decide whether you want to use Host based authentication.
16+
17+
A) If you do, you must create a file name "pg_hba" in your top-level data
18+
directory (typically the value of your $PGDATA). src/libpq/pg_hba
19+
shows an example syntax.
20+
21+
B) If you do not want host-based authentication, you can comment out
22+
the line
23+
HBA = 1
24+
in src/Makefile.global
25+
26+
Note that host-based authentication is turned on by default, and if
27+
you do not take steps A or B above, the out-of-the-box 1.01 will
28+
not allow you to connect to 1.0 databases.
29+
30+
3) compile and install 1.01, but DO NOT do the initdb step.
31+
32+
4) before doing anything else, terminate your 1.0 postmaster, and
33+
backup your existing $PGDATA directory.
34+
35+
5) set your PGDATA environment variable to your 1.0 databases, but set up
36+
path up so that 1.01 binaries are being used.
37+
38+
6) modify the file $PGDATA/PG_VERSION from 5.0 to 5.1
39+
40+
7) start up a new 1.01 postmaster
41+
42+
5) Add the new built-in functions and operators of 1.01 to 1.0
43+
databases. This is done by running the new 1.01 server against
44+
your own 1.0 database and applying the queries attached and saving
45+
in the file 1.0_to_1.01.sql. This can be done easily through psql.
46+
If your 1.0 database is name "testdb":
47+
48+
% psql testdb -f 1.0_to_1.01.sql
49+
50+
------------------------------------------------------------------------------
51+
-- add builtin functions that are new to 1.01
52+
53+
create function int4eqoid (int4, oid) returns bool as 'foo'
54+
language 'internal';
55+
create function oideqint4 (oid, int4) returns bool as 'foo'
56+
language 'internal';
57+
create function char2icregexeq (char2, text) returns bool as 'foo'
58+
language 'internal';
59+
create function char2icregexne (char2, text) returns bool as 'foo'
60+
language 'internal';
61+
create function char4icregexeq (char4, text) returns bool as 'foo'
62+
language 'internal';
63+
create function char4icregexne (char4, text) returns bool as 'foo'
64+
language 'internal';
65+
create function char8icregexeq (char8, text) returns bool as 'foo'
66+
language 'internal';
67+
create function char8icregexne (char8, text) returns bool as 'foo'
68+
language 'internal';
69+
create function char16icregexeq (char16, text) returns bool as 'foo'
70+
language 'internal';
71+
create function char16icregexne (char16, text) returns bool as 'foo'
72+
language 'internal';
73+
create function texticregexeq (text, text) returns bool as 'foo'
74+
language 'internal';
75+
create function texticregexne (text, text) returns bool as 'foo'
76+
language 'internal';
77+
78+
-- add builtin functions that are new to 1.01
79+
80+
create operator = (leftarg = int4, rightarg = oid, procedure = int4eqoid);
81+
create operator = (leftarg = oid, rightarg = int4, procedure = oideqint4);
82+
create operator ~* (leftarg = char2, rightarg = text, procedure = char2icregexeq);
83+
create operator !~* (leftarg = char2, rightarg = text, procedure = char2icregexne);
84+
create operator ~* (leftarg = char4, rightarg = text, procedure = char4icregexeq);
85+
create operator !~* (leftarg = char4, rightarg = text, procedure = char4icregexne);
86+
create operator ~* (leftarg = char8, rightarg = text, procedure = char8icregexeq);
87+
create operator !~* (leftarg = char8, rightarg = text, procedure = char8icregexne);
88+
create operator ~* (leftarg = char16, rightarg = text, procedure = char16icregexeq);
89+
create operator !~* (leftarg = char16, rightarg = text, procedure = char16icregexne);
90+
create operator ~* (leftarg = text, rightarg = text, procedure = texticregexeq);
91+
create operator !~* (leftarg = text, rightarg = text, procedure = texticregexne);
92+
93+
94+

0 commit comments

Comments
 (0)