How do I run a script or query using PgAdmin?

Article ID: 313
Category: Database
Applies to: 2.93 and newer
Updated: 2023-04-06

If our support department has requested that you run a script or query using PgAdmin, here are the steps:

1) Right-click PgAdmin and run as an administrator (Start > Programs > EventSentry > pgAdmin4 or Start > Programs > EventSentry > Database if you are on an older version). If you have a pgAdmin master password set, you will be prompted for it.

2) Double-click "Servers" or "EventSentry (localhost:5432)" to bring up the logon window and log on with the Postgres password. If you need to reset the Postgres password, please use this article: https://www.eventsentry.com/kb/227

3) On the left side of PgAdmin, open the Databases folder and then click the EventSentry object. Then click Tools > Query Tool in the menu bar to open the query window.

4) In the top left box of the query window, paste the script or query you received from our support department and then press F5 on your keyboard or click the "play" button in the toolbar to execute (use the menu bar to click Query > Execute if you are in an older version).

5) Press F8 on your keyboard to export your results as a CSV. In older versions, in the menu bar click File > Export. Leave all of the default settings and then specify a full path and file name for your export, such as c:\temp\pg-export.csv

6) E-mail the csv file to our support department