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

Commitc465dcc

Browse files
committed
Add major/minor release changes info to RELEASE_CHANGES file.
1 parentc787016 commitc465dcc

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

‎src/tools/RELEASE_CHANGES

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
* Version numbers
22
configure.in and configure
33
bump interface version numbers
4+
o src/interfaces/*/Makefile
45
o src/interfaces/libpq/libpq.rc
56
o src/include/pg_config.h.win32
67

@@ -22,3 +23,78 @@
2223
* Update pg_upgrade to handle new version, or disable
2324

2425
* Update copyright year?
26+
27+
28+
---------------------------------------------------------------------------
29+
30+
Major Version
31+
=============
32+
33+
The major version number should be updated whenever the source of the
34+
library changes to make it binary incompatible. Such changes include,
35+
but are not limited to:
36+
37+
1. Removing a public function or structure (or typedef, enum, ...)
38+
39+
2. Modifying a public functions arguments.
40+
41+
3. Removing a field from a public structure.
42+
43+
3. Adding a field to a public structure, unless steps have been
44+
previously taken to shield users from such a change, for example by
45+
such structures only ever being allocated/instantiated by a library
46+
function which would give the new field a suitable default value.
47+
48+
Adding a new function would NOT force an increase in the major version
49+
number. When the major version is increased all applications which
50+
link to the library MUST be recompiled - this is not desirable. When
51+
the major version is updated the minor version gets reset.
52+
53+
Minor Version
54+
=============
55+
56+
The minor version number should be updated whenever the functionality
57+
of the library has changed, typically and change in source code
58+
between releases would mean an increase in the minor version number so
59+
long as it does not require a major version increase.
60+
61+
Minimizing Changes
62+
==================
63+
64+
When modifying public functions arguments, steps should be taken to
65+
maintain binary compatibility across minor PostgreSQL releases (e.g. the
66+
7.2 series, the 7.3 series, the 7.4/8.0 series). Consider the following
67+
function:
68+
69+
void print_stuff(int arg1, int arg2)
70+
{
71+
printf("stuff: %d %d\n", arg1, arg2);
72+
}
73+
74+
If we wanted to add a third argument:
75+
76+
void print_stuff(int arg1, int arg2, int arg3)
77+
{
78+
printf("stuff: %d %d %d\n", arg1, arg2, arg3);
79+
}
80+
81+
Then doing it like this:
82+
83+
void print_stuff2(int arg1, int arg2, int arg3)
84+
{
85+
printf("stuff: %d %d %d\n", arg1, arg2, arg3);
86+
}
87+
88+
void print_stuff(int arg1, int arg2)
89+
{
90+
print_stuff(arg1, arg2, 0);
91+
}
92+
93+
would maintain binary compatibility. Obviously this would add a fair
94+
bit of cruft if used extensively, but considering the changes between
95+
minor versions would probably be worthwhile to avoid bumping library
96+
major version. Naturally in the next major version print_stuff() would
97+
assume the functionality and arguments of print_stuff2().
98+
99+
100+
Lee Kindness

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp