From 7a9bb5e9feab88d8cc65e890f9ba6ce4cb4023c3 Mon Sep 17 00:00:00 2001 From: litoq Date: Mon, 17 Mar 2025 19:27:50 +0300 Subject: [PATCH] fix port and db selection --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 158af82..9c3a7e1 100644 --- a/main.py +++ b/main.py @@ -139,9 +139,12 @@ class MainWindow(QMainWindow): if __name__ == "__main__": import sys - conn = psycopg2.connect("user=postgres password=456") + conn = psycopg2.connect("user=postgres password=456 host=localhost port=5432") createuUiversityDB(conn) + + conn = psycopg2.connect("user=postgres dbname=university password=456 host=localhost port=5432") + createUsersTable(conn) values = [(1, 'Ivan', 15), (2, 'Igor', 22), (3, 'Alex', 16), (4, 'Anna', 40), (5, 'Inna', 30)]