Am 03.01.2019 um 21:58 schrieb Justin Pryzby:
> On Thu, Jan 03, 2019 at 09:49:24PM +0100, Christoph Zwerschke wrote:
>> db.prepare('insert-tweet', "INSERT INTO tweets VALUES($1, $2, $3)")
>
> My first thought is to ask why not use %s parameters ?Because the $1 form is also the syntax for parameters used by the classic module in the query() method. It's very simple and natural because it's the same as you create the prepared statement in plain SQL. And it allows to adapt the query to the order of the parameter values.
Only the special query_formatted() method uses %s parameters. -- Christoph _______________________________________________ PyGreSQL mailing list [email protected] https://mail.vex.net/mailman/listinfo/pygresql
