Skip site navigation (1) Skip section navigation (2)

Re: libpq object hooks

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Andrew Chernow <ac(at)esilo(dot)com>
Subject: Re: libpq object hooks
Date: 2008-05-14 03:52:36
Message-ID: 200805140352.m4E3qa916512@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan wrote:
> The first thing it needs is lots and lots of documentation. I think it 
> probably needs a Section in the libpq chapter all on its own, preferably 
> with some examples. I think that lack alone is enough to keep it from 
> being committed for now.
> 
> Second, the hook names are compared case insensitively and by linear 
> search. I don't see any justification for using case insensitive names 
> for hooks in a C program, so I think that part should go. And if we 
> expect to keep anything other than trivial numbers of hooks we should 
> look at some sort of binary or hashed search.
> 
> The thing that is a bit disturbing is that the whole style of this 
> scheme is very different from the fairly simple APIs that the rest of 
> libpq presents. It's going to make libpq look rather odd, I think. I 
> would have felt happier if the authors had been able to come up with a 
> simple scheme to add API calls to export whatever information they 
> needed, rather than using this callback scheme.

My personal opinion is still that I would like to see a more general
usefulness for these functions before adding them to libpq.  The
complexity of the API just mirrors my gut feeling on this.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2008-05-14 04:33:13
Subject: Re: libpq object hooks
Previous:From: Josh TolleyDate: 2008-05-14 03:25:41
Subject: Re: Problem returning strings with pgsql 8.3.x

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2008-05-14 04:33:13
Subject: Re: libpq object hooks
Previous:From: Andrew DunstanDate: 2008-05-14 03:13:28
Subject: Re: libpq object hooks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group