Re: Confusion over Python drivers

From: Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Confusion over Python drivers
Date: 2010-02-13 01:07:42
Message-ID: 20100213010743.16C5B206F7@longblack.object-craft.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au> writes:
>>>> The solution is to write the query in an unambiguous way:
>>>> SELECT $1::date + 1;
>
>> You are missing the point: this is not about what types the SQL execution
>> sees. It is about making sure the correct recv function is applied to
>> the binary parameter data.
>
>Indeed, and the above locution does set that.

Sure, but it requires the driver to modify the query - that isn't
reasonable or practical. Expecting the user to the driver to know
and correct set the type the driver will ultimately see is a recipe
for disaster.

--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-02-13 01:17:47 Re: Package namespace and Safe init cleanup for plperl [PATCH]
Previous Message Tom Lane 2010-02-13 01:06:43 Re: Writeable CTEs and empty relations