Обсуждение: pgsql: Make new strings more alike previously existing messages.

Поиск
Список
Период
Сортировка

pgsql: Make new strings more alike previously existing messages.

От
alvherre@postgresql.org (Alvaro Herrera)
Дата:
Log Message:
-----------
Make new strings more alike previously existing messages.

Modified Files:
--------------
    pgsql/src/bin/pg_dump:
        pg_restore.c (r1.97 -> r1.98)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_restore.c?r1=1.97&r2=1.98)

Re: pgsql: Make new strings more alike previously existing messages.

От
Tom Lane
Дата:
alvherre@postgresql.org (Alvaro Herrera) writes:
> Make new strings more alike previously existing messages.

This patch changed the meaning of one of the messages:

*************** main(int argc, char **argv)
*** 316,322 ****
      /* Can't do single-txn mode with multiple connections */
      if (opts->single_txn && opts->number_of_jobs > 1)
      {
!         fprintf(stderr, _("%s: cannot specify both --single-transaction and multiple jobs\n"),
                  progname);
          exit(1);
      }
--- 316,322 ----
      /* Can't do single-txn mode with multiple connections */
      if (opts->single_txn && opts->number_of_jobs > 1)
      {
!         fprintf(stderr, _("%s: options -1/--single-transaction and -j/--jobs cannot be used together\n"),
                  progname);
          exit(1);
      }

As the comment and the code itself show, "-j 1" works just fine with
--single-transaction.  The original wording reflected that, the new does
not.

Maybe this amount of imprecision is acceptable, but "make it look more
like the other messages" doesn't seem to me like enough justification.

            regards, tom lane

Re: pgsql: Make new strings more alike previously existing messages.

От
Alvaro Herrera
Дата:
Tom Lane wrote:

>       /* Can't do single-txn mode with multiple connections */
>       if (opts->single_txn && opts->number_of_jobs > 1)
>       {
> !         fprintf(stderr, _("%s: options -1/--single-transaction and -j/--jobs cannot be used together\n"),
>                   progname);
>           exit(1);
>       }
>
> As the comment and the code itself show, "-j 1" works just fine with
> --single-transaction.  The original wording reflected that, the new does
> not.

Hmm, I didn't realize that you could usefully pass -j1 ... now I realize
that it even works in Make.  You're right, the new message is bogus.
I'll revert this part.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support