forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit47f5026
committed
Don't attempt to limit target database for pg_restore.
There was an apparent attempt to limit the target database forpg_restore to version 7.1.0 or later. Due to a leading zero thiswas interpreted as an octal number, which allowed targets withversion numbers down to 2.87.36. The lowest actual release abovethat was 6.0.0, so that was effectively the limit.Since the success of the restore attempt will depend primarily onon what statements were generated by the dump run, we don't wantpg_restore trying to guess whether a given target should be allowedbased on version number. Allow a connection to any version. Sinceit is very unlikely that anyone would be using a recent version ofpg_restore to restore to a pre-6.0 database, this has little to nopractical impact, but it makes the code less confusing to read.Issue reported and initial patch suggestion from Joel Jacobsonbased on an article by Andrey Karpov reporting on issues found byPVS-Studio static code analyzer. Final patch based on analysis byTom Lane. Back-patch to all supported branches.1 parented011d9 commit47f5026
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
297 | 297 |
| |
298 | 298 |
| |
299 | 299 |
| |
300 |
| - | |
301 |
| - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 |
| |
303 | 307 |
| |
304 | 308 |
| |
|
0 commit comments
Comments
(0)