> This page location: Administration Tips > Get PostgreSQL Version
> Full Neon documentation index: https://neon.com/docs/llms.txt

# How to Check PostgreSQL Version

**Summary**: in this tutorial, you will learn various ways to check the PostgreSQL version on your system.

## 1) Checking PostgreSQL version using psql

First, open Command Prompt on Windows or Terminal on a Unix-like system.

Second, run the following command:

```bash
psql --version
```

This command will display the PostgreSQL version installed on your server.

## 2) Getting the version using SQL statements

First, connect to the PostgreSQL server using psql or GUI tools like pgAdmin.

For example, you can connect to the PostgreSQL server using psql:

```bash
psql -U postgres
```

Second, run the following statement to retrieve the version:

```sql
SELECT version();

```

The query will return a text that includes the PostgreSQL version. For example:

```text
                          version
------------------------------------------------------------
 PostgreSQL 16.1, compiled by Visual C++ build 1937, 64-bit
(1 row)
```

## 3) Querying version from the information schema

First, connect to the PostgreSQL database using psql or a PostgreSQL client.

Second, execute the following query to get the PostgreSQL version:

```sql
SELECT
  setting
FROM
  pg_settings
WHERE
  name = 'server_version';
```

Output:

```
 setting
---------
 16.1
(1 row)
```

## Summary

- Use the `psql --version` command, `select version()` statement, and retrieve the `setting` from the `pg_settings` to get the PostgreSQL version.

---

## Related docs (Administration Tips)

- [Reset Password](https://neon.com/postgresql/postgresql-administration/postgresql-reset-password)
- [Describe Table](https://neon.com/postgresql/postgresql-administration/postgresql-describe-table)
- [Show Databases](https://neon.com/postgresql/postgresql-administration/postgresql-show-databases)
- [Show Tables](https://neon.com/postgresql/postgresql-administration/postgresql-show-tables)
- [Practical psql Commands](https://neon.com/postgresql/postgresql-administration/psql-commands)
- [Restart PostgreSQL on Windows](https://neon.com/postgresql/postgresql-administration/restart-postgresql-windows)
- [Restart PostgreSQL on Ubuntu](https://neon.com/postgresql/postgresql-administration/postgresql-restart-ubuntu)
- [Check PostgreSQL Uptime](https://neon.com/postgresql/postgresql-administration/postgresql-uptime)
- [Password File (.pgpass)](https://neon.com/postgresql/postgresql-administration/postgresql-password-file-pgpass)
- [Terminate Backend Connections](https://neon.com/postgresql/postgresql-administration/postgresql-pg_terminate_backend)
- [Uninstall PostgreSQL on Ubuntu](https://neon.com/postgresql/postgresql-administration/uninstall-postgresql-ubuntu)
