I have installed PostgreSQL 16.8 and am trying to run the script provided in this documentation to create the agm database. I have searched online and looked around in both pgAdmin and psql and am unable to find the location. Where can I enter this script so I can create the database?
Hey Jasmine!
You can use the SQL Shell (psql) that comes with the Postgres installation. You can find it by opening the Start Menu and expanding the PostgreSQL folder on the machine where PostgreSQL is installed.
Once you open the SQL Shell, you'll be prompted to connect to the default Postgres database. Personally, I enter the values in the bracket, my install is default:
After, you can paste the script into the SQL Shell after making your edits, and it should run; you may have to hit enter on the "GRANT ALL" command to complete the script.
I hope this helps!
I prefer a GUI interface and like to use pgAdmin 4 for this process.
Once logged in as a DB Admin user, 'postegres' by default you can right click on your default 'postgres' DB and choose Query Tool > Then Copy Paste the SQL commands from the AGM Help > fill in a password and run each block separately by highlighting and choosing 'Execute script'.