def is_table_partitioned(conn, tbl_name):
    """Function to determine whether a table is partitioned."""
    with conn.cursor() as cursor:
        cursor.execute("""SELECT EXISTS (SELECT 1
                                           FROM pg_class
                                           JOIN pg_partitioned_table
                                                ON pg_partitioned_table.partrelid = pg_class.oid
                                          WHERE pg_class.relname = %s)""", [tbl_name])
        return cursor.fetchone().exists