Can't insert records to Postgres Resource via connection string

We were doing some testing of our workflows and we were having some issues with inserting records into the (hosted) Retool Postgres DB from our own infrastructure. We are currently using the connection string provided by the UI and pyscopg2 to insert data. However, it never actually seems to show up in the GUI.

Here are steps for reproduction:

  1. Create a new table in the GUI with auto incrementing ID and one column
  2. Use the connection string and psycopg2 to connect to the DB
  3. Insert 1 record and return the ID (getting back an ID of 1 for the first record)
  4. Check the GUI but see that there is no record

I can create records via the GUI, and they respect the incremented ID, but I can never see any of the records I created from the connection string. Similarly, after I manually create a record for the table, using the connection string to insert records shows that the new records respect the incremented ID from the manual insertion, just the UI doesn't show it. Similarly, querying for records via the connection string only shows manually inserted records.

Record Insertion Code:

conn = psycopg2.connect(
dbname="retool",
user="retool",
password="password",
host="host"
)

current_dt = str(datetime.datetime.today())

insert_cmd = r"INSERT INTO test (foo) VALUES ('foo') RETURNING id, foo;"

data = ('testvalue',)
cursor = conn.cursor()
cursor.execute(insert_cmd)

print(cursor.fetchone())

Not sure what's going on here. Are there prohibitions on inserting records via the connection string?

This is a silly mistake. I forgot to add conn.commit() after execute(). Everything works fine.