Jaime Casanova wrote:
On Thu, Sep 10, 2009 at 12:01 AM, Jaime Casanova
<[email protected]> wrote:
On Mon, Jul 6, 2009 at 10:00 AM, Heikki
Linnakangas<[email protected]> wrote:
Could we
have a version of PQconnectdb() with an API more suited for setting the
params programmatically? The PQsetdbLogin() approach doesn't scale as
parameters are added/removed in future versions, but we could have
something like this:
PGconn *PQconnectParams(const char **params)
Where "params" is an array with an even number of parameters, forming
key/value pairs. Usage example:
i extracted the functions to connect that Heikki put on psql in his
patch for determining client_encoding from client locale and put it in
libpq so i follow the PQconnectdbParams(* params[]) approach.
I was following this and never saw any firm decision on the prototype
for this function. Although, I can say the single argument version did
not appear to win any votes.
The below posts agreed on a two argument version of parallel arrays
(keywords, values):
http://archives.postgresql.org/pgsql-hackers/2009-09/msg00533.php
http://archives.postgresql.org/pgsql-hackers/2009-09/msg00559.php
There is also the idea of passing an array of structs floating around,
NULL terminated list or include an additional argument specifying
element count.
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers