Re: API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)

Daniele Varrazzo <[email protected]>
Newsgroups gmane.comp.python.db
Message-ID <CA+mi_8ZW3gLsh1_zCKKzWtGQwQHoLnVRNCVQFkEY4L=nLg1kGA@mail.gmail.com>
On Fri, May 17, 2013 at 5:33 PM, Christoph Zwerschke <[email protected]> wrote:
> Am 17.05.2013 18:21, schrieb Daniele Varrazzo:
>
>> Quite the contrary: the quotes should never appear in the query and
>> these examples are correct but...
>
> Just tested this with psycopg2. If you use the clause "WHERE name=%s" and
> pass a value without quotes, you get a ProgrammingError from the database.
> So is psycopg2 not properly implementing DBAPI 2?

You have tested it wrong, and haven't bothered reading the first few
lines of the first page of the documentation of the driver library.

-- Daniele
_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.