forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc98c35c
committed
Avoid putting build-location-dependent strings into generated files.
Various Perl scripts we use to generate files were in the habit ofprinting things like "generated by $0" into their output files.That looks like a fine idea at first glance, but it results innon-reproducible output, because in VPATH builds $0 won't be justthe name of the script file, but a full path for it. We'd preferthat you get identical results whether using VPATH or not, so thisis a bad thing.Some of these places also printed their input file name(s), causingan additional hazard of the same type.Hence, establish a policy that thou shalt not print $0, nor input filepathnames, into output files (they're still allowed in error messages,though). Instead just write the script name verbatim. While we are atit, we can make these annotations more useful by giving the script'sfull relative path name within the PG source tree, eg instead ofGen_fmgrtab.pl let's print src/backend/utils/Gen_fmgrtab.pl.Not all of the changes made here actually affect any files shippedin finished tarballs today, but it seems best to apply the policyeveryplace so that nobody copies unsafe code into places where itcould matter.Christoph Berg and Tom LaneDiscussion:https://postgr.es/m/20171215102223.GB31812@msg.df7cb.de1 parent59d1e2b commitc98c35c
File tree
17 files changed
+21
-26
lines changed- src
- backend
- catalog
- utils
- mb/Unicode
- bin/psql
- pl/plperl
- test/perl
17 files changed
+21
-26
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
343 |
| - | |
| 343 | + | |
344 | 344 |
| |
345 | 345 |
| |
346 | 346 |
| |
|
Lines changed: 3 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
122 |
| - | |
| 121 | + | |
123 | 122 |
| |
124 | 123 |
| |
125 | 124 |
| |
| |||
153 | 152 |
| |
154 | 153 |
| |
155 | 154 |
| |
156 |
| - | |
157 |
| - | |
| 155 | + | |
158 | 156 |
| |
159 | 157 |
| |
160 | 158 |
| |
| |||
181 | 179 |
| |
182 | 180 |
| |
183 | 181 |
| |
184 |
| - | |
185 |
| - | |
| 182 | + | |
186 | 183 |
| |
187 | 184 |
| |
188 | 185 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
|
Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 |
| - | |
| 54 | + | |
56 | 55 |
| |
57 | 56 |
| |
58 | 57 |
| |
| |||
76 | 75 |
| |
77 | 76 |
| |
78 | 77 |
| |
79 |
| - | |
80 |
| - | |
| 78 | + | |
81 | 79 |
| |
82 | 80 |
| |
83 | 81 |
| |
| |||
131 | 129 |
| |
132 | 130 |
| |
133 | 131 |
| |
134 |
| - | |
| 132 | + | |
135 | 133 |
| |
136 | 134 |
| |
137 | 135 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 |
| - | |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
|
0 commit comments
Comments
(0)