Re: Using the new libpq connection functions in PostgreSQL binaries

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: pgsql-hackers@postgresql.org
Date: 2010-01-31T16:35:49Z
Lists: pgsql-hackers
Guillaume Lelarge <guillaume@lelarge.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