I need to call a PostgreSQL 8.4 function that requires 17 input parameters from Python. Values ββare stored in the dictionary. Therefore, I can write:
cur.execute("SELECT add_user(%s, %s, %s, %s, %s, %s, %s, .......)", user["nr"], user['email']...)
Is it possible to automatically match the values ββin the dictionary with the arguments of the function (which have the same name as the keys in the dictionary)?
Sort of:
cur.execute("SELECT add_user(*magic-here*)", user)
source share