Re: [psycopg] Solving the SQL composition problem
От | Jim Nasby |
---|---|
Тема | Re: [psycopg] Solving the SQL composition problem |
Дата | |
Msg-id | 86ed1046-7895-a758-f8f2-7dbab82de569@BlueTreble.com обсуждение исходный текст |
Ответ на | [psycopg] Solving the SQL composition problem (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
Ответы |
Re: [psycopg] Solving the SQL composition problem
Re: [psycopg] Solving the SQL composition problem |
Список | psycopg |
On 1/1/17 2:11 AM, Daniele Varrazzo wrote: > sql.SQL("insert into %s values (%%s)") % [sql.Identifier('mytable')], Since %s isn't standard parameter replacement anyway, I'm wondering if both considerations could just be handled by execute(), by using different replacement syntax. IE: execute('insert into %s values ($1)', [42], ['my table']) Obviously this would be backwards incompatible, but I think that's manageable. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532)
В списке psycopg по дате отправления: