Re: Using the new libpq connection functions in PostgreSQL binaries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using the new libpq connection functions in PostgreSQL binaries
Date
Msg-id 25604.1264955749@sss.pgh.pa.us
Whole thread Raw
In response to Using the new libpq connection functions in PostgreSQL binaries  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Using the new libpq connection functions in PostgreSQL binaries  (Guillaume Lelarge <guillaume@lelarge.info>)
List 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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: odd output in initdb
Next
From: Tom Lane
Date:
Subject: Re: odd output in initdb