From:
Jeff Davis <pgsql(at)j-davis(dot)com>
To:
Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
Cc:
PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Confusion over Python drivers
Date:
2010-02-09 04:20:19
Message-ID:
1265689219.29919.2570.camel@jdavis (view raw or flat )
Thread:
2010-02-05 14:19:26 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 14:28:10 from "Massa, Harald Armin" <chef(at)ghum(dot)de>
2010-02-05 14:38:33 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 19:22:50 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-05 14:43:18 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2010-02-05 14:45:45 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 18:35:57 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-02-05 18:50:32 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 19:32:10 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-05 14:45:32 from Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
2010-02-05 14:46:14 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 15:00:45 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2010-02-05 17:01:42 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 18:34:23 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-02-05 19:54:39 from James William Pye <lists(at)jwp(dot)name>
2010-02-05 20:34:53 from Marko Kreen <markokr(at)gmail(dot)com>
2010-02-05 20:49:01 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-06 00:39:53 from Andres Freund <andres(at)anarazel(dot)de>
2010-02-06 00:42:35 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-02-06 02:18:58 from James William Pye <lists(at)jwp(dot)name>
2010-02-07 00:51:18 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-02-07 04:50:31 from James William Pye <lists(at)jwp(dot)name>
2010-02-06 22:38:37 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-06 23:55:30 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-07 00:48:33 from Marko Kreen <markokr(at)gmail(dot)com>
2010-02-07 02:11:01 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-02-07 10:20:13 from Marko Kreen <markokr(at)gmail(dot)com>
2010-02-07 11:27:45 from "Massa, Harald Armin" <chef(at)ghum(dot)de>
2010-02-07 19:50:05 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-02-07 20:23:06 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-07 10:18:26 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-07 19:54:35 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-08 09:06:46 from Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it>
2010-02-11 05:26:56 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-11 05:46:32 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-02-11 06:04:08 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-07 23:53:26 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-08 00:19:33 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-08 01:25:43 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-08 06:56:20 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-08 19:50:37 from Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
2010-02-08 22:15:57 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-08 23:34:25 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-08 23:46:54 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-09 00:01:55 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-09 01:51:09 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-09 02:38:47 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-09 02:56:49 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-09 04:20:19 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-09 04:32:26 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-09 06:53:54 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-11 17:08:30 from "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
2010-02-12 07:28:26 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-12 14:31:27 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-02-13 01:07:42 from Andrew McNamara <andrewm(at)object-craft(dot)com(dot)au>
2010-02-08 08:14:22 from "Massa, Harald Armin" <chef(at)ghum(dot)de>
2010-02-08 08:36:52 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-08 11:55:11 from "Massa, Harald Armin" <chef(at)ghum(dot)de>
2010-02-08 23:50:53 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-05 19:08:31 from James William Pye <lists(at)jwp(dot)name>
2010-02-05 20:51:06 from Greg Smith <greg(at)2ndquadrant(dot)com>
2010-02-05 21:01:52 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-02-05 23:47:19 from Marko Kreen <markokr(at)gmail(dot)com>
2010-02-07 06:40:35 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-08 14:32:08 from "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
2010-02-08 19:29:42 from Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
2010-02-08 20:38:40 from Jeff Davis <pgsql(at)j-davis(dot)com>
2010-02-14 19:43:03 from Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
2010-02-16 03:48:32 from Jeff Davis <pgsql(at)j-davis(dot)com>
Lists:
pgsql-hackers
On Tue, 2010-02-09 at 13:56 +1100, Andrew McNamara wrote:
> >For a given type, the input function may be more likely to catch an
> >input error than the recv function; or the reverse. Either way, it is
> >very type-specific, and the only difference is the whether the input is
> >misinterpreted (type error not caught; bad) or an error is thrown (type
> >error caught; better).
>
> This is the crux of the matter: the type input functions are universally
> more forgiving since, by their nature, text formats are designed for us
> fuzzy humans, and users of adapters have come to expect this.
Except that it's exactly the opposite with integers. Pass any 4 bytes to
in4recv(), and it will accept it. However, try passing '4.0' to
int4in(), and you get an error.
If I had to make an educated guess about the forgiveness of various type
input and type recv functions, I would say that the recv functions are
more forgiving. After all, you would expect the binary format to be less
redundant, and therefore less likely to catch inconsistencies. I don't
see much of a universal truth there, however.
This is getting pretty far off-topic, so let's just leave it at that.
The drivers should support both formats; the type inference logic
doesn't care at all about the contents of the unknown literals (text or
binary); and queries should be written in such a way that the types are
unambiguous and unsurprising.
Regards,
Jeff Davis
In response to
pgsql-hackers by date
Next :From: M ZDate: 2010-02-09 04:24:46
Subject : Re: CVS checkout source code for different branches
Previous :From : M ZDate : 2010-02-09 04:04:51
Subject : Re: CVS checkout source code for different branches