forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9ae9d8c
committed
Add psql variables showing server version and psql version.
We already had a psql variable VERSION that shows the verbose form ofpsql's own version. Add VERSION_NAME to show the short form (e.g.,"11devel") and VERSION_NUM to show the numeric form (e.g., 110000).Also add SERVER_VERSION_NAME and SERVER_VERSION_NUM to show the short andnumeric forms of the server's version. (We'd probably add SERVER_VERSIONwith the verbose string if it were readily available; but adding anothernetwork round trip to get it seems too expensive.)The numeric forms, in particular, are expected to be useful for scriptingpurposes, now that psql can do conditional tests.Fabien Coelho, reviewed by Pavel StehuleDiscussion:https://postgr.es/m/alpine.DEB.2.20.1704020917220.4632@lancre1 parent3955c8c commit9ae9d8c
File tree
4 files changed
+52
-3
lines changed- doc/src/sgml/ref
- src/bin/psql
4 files changed
+52
-3
lines changedLines changed: 22 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3670 | 3670 |
| |
3671 | 3671 |
| |
3672 | 3672 |
| |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
3673 | 3688 |
| |
3674 | 3689 |
| |
3675 | 3690 |
| |
| |||
3733 | 3748 |
| |
3734 | 3749 |
| |
3735 | 3750 |
| |
| 3751 | + | |
| 3752 | + | |
3736 | 3753 |
| |
3737 | 3754 |
| |
3738 |
| - | |
3739 |
| - | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
3740 | 3760 |
| |
3741 | 3761 |
| |
3742 | 3762 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3337 | 3337 |
| |
3338 | 3338 |
| |
3339 | 3339 |
| |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
3340 | 3343 |
| |
3341 | 3344 |
| |
3342 | 3345 |
| |
| |||
3348 | 3351 |
| |
3349 | 3352 |
| |
3350 | 3353 |
| |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
3351 | 3368 |
| |
3352 | 3369 |
| |
3353 | 3370 |
| |
| |||
3366 | 3383 |
| |
3367 | 3384 |
| |
3368 | 3385 |
| |
| 3386 | + | |
| 3387 | + | |
3369 | 3388 |
| |
3370 | 3389 |
| |
3371 | 3390 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
| 339 | + | |
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
| |||
387 | 387 |
| |
388 | 388 |
| |
389 | 389 |
| |
| 390 | + | |
| 391 | + | |
| 392 | + | |
390 | 393 |
| |
391 | 394 |
| |
392 | 395 |
| |
| |||
397 | 400 |
| |
398 | 401 |
| |
399 | 402 |
| |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
400 | 407 |
| |
401 | 408 |
| |
402 | 409 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
| 163 | + | |
163 | 164 |
| |
| 165 | + | |
| 166 | + | |
164 | 167 |
| |
165 | 168 |
| |
166 | 169 |
| |
|
0 commit comments
Comments
(0)