Hello, I have a simple script to connect to my postgres database in vscode, which it does successfully, but it immediately exits the postgres command prompt in the terminal and reverts back to the file directory command prompt. I’m wondering if there’s a way to keep that postgres command prompt open after my script runs. Here’s the script.
#=============== CONNECT TO DATABASE ================================================= #Credentials defined in config file conn_string = 'host=' + PGHOST + " port=" + "5432" + " dbname=" + PGDATABASE + ' user=' + PGUSER + " password=" + PGPASS conn = psycopg2.connect(conn_string) print("Connected to Database!") #CREATE A CURSOR OBJECT cursor = conn.cursor()