Re: new version of PQconnectdb was:(Re: [HACKERS] Determining client_encoding from client locale)
От | Andrew Chernow |
---|---|
Тема | Re: new version of PQconnectdb was:(Re: [HACKERS] Determining client_encoding from client locale) |
Дата | |
Msg-id | 4AAE8CCF.9070808@esilo.com обсуждение исходный текст |
Ответ на | Re: new version of PQconnectdb was:(Re: [HACKERS] Determining client_encoding from client locale) (Jaime Casanova <jcasanov@systemguards.com.ec>) |
Ответы |
Re: new version of PQconnectdb was:(Re: [HACKERS]
Determining client_encoding from client locale)
|
Список | pgsql-hackers |
Jaime Casanova wrote: > On Thu, Sep 10, 2009 at 12:01 AM, Jaime Casanova > <jcasanov@systemguards.com.ec> wrote: >> On Mon, Jul 6, 2009 at 10:00 AM, Heikki >> Linnakangas<heikki.linnakangas@enterprisedb.com> 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/
В списке pgsql-hackers по дате отправления: