Postgresql

//NOTE "postgres" is the service user for PostgreSQL server.


Connect to the local PostgreSQL database by running psql

Once you gain access, you can navigate the database using:

    \list          to list the databases
    \c [DATABASE]  to select the database [DATABASE]
    \d             to list the tables

Once you gain access, you can read files from the file system using:

# CREATE TABLE demo(t text);
# COPY demo from '[FILENAME]';
# SELECT * FROM demo;

Where [FILENAME] is the filename.

Last updated