From:
Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
To:
Jeff Davis <pgsql(at)j-davis(dot)com>
Cc:
PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject:
Re: Confusion over Python drivers
Date:
2010-02-08 19:29:42
Message-ID:
87bpfz7cgp.fsf@mid.deneb.enyo.de (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
* Jeff Davis:
> I have written up a set of guidelines for driver development based on
> what I learned working on ruby-pg:
>
> http://wiki.postgresql.org/wiki/Driver_development
Interesting, thanks.
I'm contemplating to create a new language binding for libpq (or, to
be more precise, turn an existing language binding into something that
can be published). I've been agonizing a bit over how to create a
bridge between the host language type system and the PostgreSQL type
system. If I understand you correctly, you suggest to leave
everything as strings. This solution has the appeal of being
implemented easily. It also sidesteps a lot of issues revolving
around different representation choices for numbers.
Do you really suggest to preserve the PQexecParams API verbatim, that
is, passing in three arrays containing type, value, and format? That
seems to be a bit problematic. I suspect the common case will be to
use unknown types, text format, and the default conversion from values
to strings. Only for BYTEA values, something else is required, and
I'm wondering how to encode that (the host language doesn't offer a
distinction between text and binary strings).
Conversely, for result sets, I'm tempted to transparently decode
escaped BYTEA columns.
> Note that the ruby-pg driver doesn't 100% adhere to those standards
> (encoding is the primary problem, and that will be fixed).
Lack of Unicode support means that I can punt that to application
authors, I guess.
By the way, the downside of using strings everywhere is that your
binding API will most likely not work with SQLite (or any other
SQL-like database which lacks column type information).
In response to
Responses
pgsql-hackers by date
Next :From: Andres FreundDate: 2010-02-08 19:29:46
Subject : Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Previous :From : Alvaro HerreraDate : 2010-02-08 19:19:17
Subject : Re: Order of operations in lazy_vacuum_rel