From 6702e1e4f0d2f3da79d74cc02020831fbe1d205c Mon Sep 17 00:00:00 2001 From: Morgan Date: Sat, 12 Oct 2019 14:08:46 +0200 Subject: [PATCH] Which version of PostgreSQL am I running? --- cheat/postgresql.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cheat/postgresql.md b/cheat/postgresql.md index f46275b..0ebc3b9 100644 --- a/cheat/postgresql.md +++ b/cheat/postgresql.md @@ -49,3 +49,8 @@ ### Detail of a role `SELECT * FROM pg_roles WHERE rolname = '...'` + +### Which version of PostgreSQL am I running? [src](https://stackoverflow.com/questions/13733719/which-version-of-postgresql-am-i-running) + +If you're using CLI and you're a postgres user, then you can do this: +`psql -c "SELECT version();"`