initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env python
import psycopg2
pg_conn = psycopg2.connect(
host="localhost",
dbname="postgres",
user="postgres",
password='scripts',
)
pg_cursor = pg_conn.cursor()
# select first name, last name from all presidents
pg_cursor.execute('''
select firstname, lastname from presidents order by termnum
''')
print("{} rows in result set\n".format(pg_cursor.rowcount))
for row in pg_cursor.fetchall():
print(' '.join(row))
print()
pg_conn.close()