From: Alvaro Herrera <alvherre@commandprompt.com>
To: Andrew Chernow <ac@esilo.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: libpq object hooks (libpq events)
Date: Wed, 3 Sep 2008 12:55:44 -0400
Message-ID: <20080903165544.GA4114@alvh.no-ip.org> (raw)
In-Reply-To: <48BE0424.4080905@esilo.com>
References: <482B1480.1070705@esilo.com>
<482B2AC5.7000503@esilo.com>
<482ECF62.7010901@esilo.com>
<12200.1211242959@sss.pgh.pa.us>
<48323593.4060302@esilo.com>
<13642.1211251078@sss.pgh.pa.us>
<48323F94.6010201@esilo.com>
<48325386.2010506@esilo.com>
<20080903001920.GT12610@alvh.no-ip.org>
<48BE0424.4080905@esilo.com>
Andrew Chernow escribió:
> Alvaro Herrera wrote:
>> (I also removed PQresultAlloc.)
>
> Nooooooo ... removing PQresultAlloc breaks libpqtypes! It also removes
> some of the use cases provided by PQsetvalue, which allows one to add to
> a result (in our case from scratch).
I don't really see the point -- it's the same as pqResultAlloc, except
that you have to pass an extra argument. There's no actual
functionality loss.
> > However, the only change of any significance that I introduced was that
> > a "name" is attached to every event proc, so that it can be reported in
> > error messages, as reporting only %p seems very useless. (I also
> > removed PQresultAlloc.)
>
> I don't mind re-introducing the name, but Tom seemed very against this
> due to conflicts. If 2 different libraries register the same name,
> debugging would be painful.
Hmm, is that really a good argument? I don't see how providing a
pointer is a better answer than a name -- it's far less user friendly.
Let's start assuming that no duplicate names would be used, and if there
are any conflicts in the real world, we can just ask the user to fire up
GDB to figure out where each name is pointing to. My guess is that
conflicting names will be a rarity, if we ever get to see them. (Would
two different libraries call themselves "pqtypes", for example?)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: alvherre@commandprompt.com, ac@esilo.com, mmoncure@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: libpq object hooks (libpq events)
In-Reply-To: <20080903165544.GA4114@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox