How to Find Out PostgreSQL Version - Version() Function

Connect to a PostgreSQL database, and execute version() function to find out the PostgreSQL version:

   -- Define the PostgreSQL version
   SELECT version();

The query returns (a sample output that depends on the system):

PostgreSQL 9.0.4, compiled by Visual C++ build 1500, 32-bit