I need to call a PostgreSQL 8.4 function which requires 17 input paramters from Python. The values are stored in a dictionary. So I can write:
cur.execute("SELECT add_user(%s, %s, %s, %s, %s, %s, %s, .......)", user["nr"], user['email']...)
Is it possible to automatically map the values in the dictionary to the function arguments (which have the same name as the keys in the dictionary)?
Something like:
cur.execute("SELECT add_user(*magic-here*)", user)