You can use psql commands to load data into a vFabric Postgres database and to query a vFabric Postgres database.

Use the psql command \COPY (back slash-COPY) to load data into vFabric Postgres databases. Do not use the psql COPY FROM or COPY TO command. The COPY FROM (or COPY TO) command must run on the server with superuser privileges and cannot load data into remote clients such as vFabric Postgres for Data Director. The \COPY FROM and \COPY TO commands use the client session to read and write from local files. These commands support relative paths, and use the psql communication layer to load data to, or from, the server.

For example, the following psql command loads data from a text file, shelterlists.txt, into the vFabric Postgres database table shelters in the schema rescues.

\copy rescues.shelters from 'C:\shelterslists.txt';

After you connect to a vFabric Postgres database, you can query the database. For example, using psql, connect to the database and type the psql command at the database prompt.

You can run SQL script files using the psql -f SQL_script_filename command, where the file named SQL_script_filename contains a series of SQL commands. Psql reads the file, runs the SQL commands, and exits.