When getting a query result from a remote server, does the execution of the query transmit the result to the local machine, or is it buffered on remote and only downloaded when fetching the result?
Here is how the cursor is defined:
con = psycopg2.connect(f"host='{host}' port='{port}' dbname='{DB}' user='{user}' password='{pw}'")
cur = con.cursor()