=?UTF-8?B?V8OoaSBDxY1uZ3J1w6w=?= <crvv.mail@xxxxxxxxx> writes: > On Thu, Aug 9, 2018 at 3:01 PM Luca Ferrari <fluca1978@xxxxxxxxx> wrote: >> Is there any way to get directly the PostgreSQL version number? > SHOW server_version; > SHOW server_version_num; Also, if you're using libpq, see PQserverVersion() which (a) avoids a round trip to the server, and (b) works further back than server_version_num, though that issue is probably academic to most folk at this point (server_version_num appeared in 8.2). regards, tom lane