• The live AACT database is temporarily unavailable because the daily update is running.

Query AACT with pSQL

The most fundamental way to access AACT data is by using the standard postgreSQL command line query tool: pSQL. This tool is part of the PostgreSQL client software.


Install PostgreSQL Database Platform

The standard PostgreSQL installation includes a number of related tools that you'll need, such as pSQL, createdb & pg_restore. These tools are mentioned throughout the documentation provided on this site; they should all be available to you once PostgreSQL is installed.

AACT is currently running on version 9.5.4 of PostgreSQL; it's recommended you install this version or higher. Refer to PostgreSQL Downloads for free software and installation instructions.


Launch pSQL

Once PostgreSQL is installed on your local machine, you can access pSQL from a terminal session by entering the command: psql. To access the AACT cloud-hosted database, open a terminal window and enter the psql command with the following syntax.


-> psql --host --port=5432 --username=aact --dbname=aact psql (9.5.3, server 9.5.4) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. aact=> _

The aact=> prompt indicates that you're in a pSQL console session and can enter SQL queries against the AACT database. A simple example:


aact=> select count(*) from studies; count -------- 244963 (1 row) aact=> _

Important note: To exit pSQL, enter the (not entirely intuitive) command: \q and hit return.


aact=> \q -> _