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

Commit9152beb

Browse files
committed
Add 'adddepend' script to handle pre-7.3 object dependencies.
1 parentda123b7 commit9152beb

File tree

3 files changed

+602
-0
lines changed

3 files changed

+602
-0
lines changed

‎contrib/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ procedure.
2424
Index:
2525
------
2626

27+
adddepend -
28+
Add object dependency information to pre-7.3 objects.
29+
by Rod Taylor <rbt@rbt.ca>
30+
2731
array -
2832
Array iterator functions
2933
by Massimo Dal Zotto <dz@cs.unitn.it>

‎contrib/adddepend/README.adddepend

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
Dependency Additions For PostgreSQL 7.3 Upgrades
3+
4+
In PostgreSQL releases prior to 7.3, certain database objects didn't
5+
have proper dependencies. For example:
6+
7+
1) When you created a table with a SERIAL column, there was no linkage
8+
to its underlying sequence. If you dropped the table with the SERIAL
9+
column, the sequence was not automatically dropped.
10+
11+
2) When you created a foreign key, it created three triggers. If you
12+
wanted to drop the foreign key, you had to drop the three triggers
13+
individually.
14+
15+
3) When you created a column with constraint UNIQUE, a unique index was
16+
created but there was no indication that the index was created as a
17+
UNIQUE column constraint.
18+
19+
Fortunately, 7.3 now tracks such dependencies and handles these cases.
20+
Unfortunately, PostgreSQL dumps from prior releases don't contain
21+
such dependency information.
22+
23+
This script operates on >= 7.3 databases and adds dependency information
24+
for the objects listed above. It prompts the user on whether to create
25+
a linkage for each object. You can use the -Y option to prevent such
26+
prompting and have it generate all possible linkages.
27+
28+
This program requires the Pg:DBD Perl interface.
29+
30+
Usage:
31+
32+
upgrade.pl [options] [dbname [username]]
33+
34+
Options:
35+
-d <dbname> Specify database name to connect to (default: postgres)
36+
-h <host> Specify database server host (default: localhost)
37+
-p <port> Specify database server port (default: 5432)
38+
-u <username> Specify database username (default: postgres)
39+
--password=<pw> Specify database password (default: blank)
40+
41+
-Y The script normally asks whether the user wishes to apply
42+
the conversion for each item found. This forces YES to all
43+
questions.
44+
45+
Rod Taylor <rbt@rbt.ca>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp