Re: Using the new libpq connection functions in PostgreSQL binaries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using the new libpq connection functions in PostgreSQL binaries
Date: 2010-01-31 16:35:49
Message-ID: 25604.1264955749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:

> */
> do
> {
> + const char *values[] = {
> + my_opts->hostname,
> + my_opts->port,
> + my_opts->dbname,
> + my_opts->username,
> + password,
> + "oid2name",
> + NULL
> + };
> +
> new_pass = false;

Is that really legal C89 syntax? I seem to recall that array
constructors can only be used for static assignments with older
compilers.

Also, as a matter of style, I find it pretty horrid that this isn't
immediately adjacent to the keywords array that it MUST match.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-31 16:56:11 Re: odd output in initdb
Previous Message Magnus Hagander 2010-01-31 16:33:44 Re: odd output in initdb