Connecting to the PostgreSQL database
You can connect to the PostgreSQL database directly by using
psql
, an interactive terminal program. After you make the connection, you can use SQL
statements to extract or query the data without using a business intelligence tool.- Note:
- You don't have to follow this procedure if you use Data Transmitters.
psql
command prompt, the database is running.- Log in to the primary computer.
- Go to this directory:
Linux: /aiw/aiw1/bin/postgresql/Linux/pgsql/bin
or /usr/pgsql-14/bin/Windows: C:\aiw\aiw1\bin\postgresql\Windows\pgsql\bin
or <RPD Install Directory>\PostgreSQL\bin\
- Enter this command: ./psql database username
Replace database with the name of the database that you specified in . The default is
history
.Replace username with the user name that you specified in . The default is
rpdreports
. - If prompted, enter the password that you specified in .
The
psql
command prompt database=# is displayed.If you specified
history
in the command, the command prompt is history=#.You now are connected to the PostgreSQL database.
- To access the data, run SQL statements.
- To exit
psql
, enter: \q