Re: pg_dumpall bug in PG 8.0b3 Win32 port

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: pg_dumpall bug in PG 8.0b3 Win32 port
Date: 2004-10-06 17:02:08
Message-ID: 200410061702.i96H28I26330@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Luiz K. Matsumura wrote:
>
>
> Andrew Dunstan wrote:
>
> >
> >
> > Luiz K. Matsumura wrote:
> >
> >> Hi,
> >>
> >> I tried to use pg_dumpall in Win32 and receive a error message like
> >> this:
> >>
> >> pg_dump.exe: [archiver (db)] connection to database "test" failed:
> >> FATAL: user "'postgres'" does not exist
> >>
> >> Well, the word "'postgres'" is the word is between simple quotations
> >> marks and later between double quotations marks.
> >> Then, I assume that the error must be in string that pg_dumpall mounts
> >> to execute pg_dump
> >>
> >> I modified pg_dumpall.c lines between 160 and 270 to add a #ifndef
> >> WIN32... #endif clause to pgdumpopts to store
> >> the parameters with double quotations intead simple quotation marks in
> >> case of WIN32 ports
> >> But, I don't have how to test it.
> >> Please, somebody can test and fix the pg_dumpall.c of oficial source ?
> >>
> >> Thanks in advance
> >>
> >> Luiz
> >>
> >>
> >>
> >
> > Please provide your patch as a context diff, not as the whole file, so
> > we can see what is changed.
> >
> > cheers
> >
> > andrew
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 8: explain analyze is your friend
> >
> Ops, excuse-me. I'm a novice.
>
>
>
>

> *** pg_dumpall.c Tue Oct 5 18:53:27 2004
> --- pg_dumpall.c.ori Tue Oct 5 21:59:42 2004
> ***************
> *** 180,195 ****
>
> case 'h':
> pghost = optarg;
> - #ifndef WIN32
> appendPQExpBuffer(pgdumpopts, " -h '%s'", pghost);
> - #else
> - appendPQExpBuffer(pgdumpopts, " -h \"%s\"", pghost);
> - #endif
> -
> break;
>
> -
> -
> case 'i':
> case 'o':
> appendPQExpBuffer(pgdumpopts, " -%c", c);
> --- 180,188 ----
> ***************
> *** 201,211 ****
>
> case 'p':
> pgport = optarg;
> - #ifndef WIN32
> appendPQExpBuffer(pgdumpopts, " -p '%s'", pgport);
> - #else
> - appendPQExpBuffer(pgdumpopts, " -p \"%s\"", pgport);
> - #endif
> break;
>
> case 's':
> --- 194,200 ----
> ***************
> *** 214,233 ****
> break;
>
> case 'S':
> - #ifndef WIN32
> appendPQExpBuffer(pgdumpopts, " -S '%s'", optarg);
> - #else
> - appendPQExpBuffer(pgdumpopts, " -S \"%s\"", optarg);
> - #endif
> break;
>
> case 'U':
> pguser = optarg;
> - #ifndef WIN32
> appendPQExpBuffer(pgdumpopts, " -U '%s'", pguser);
> - #else
> - appendPQExpBuffer(pgdumpopts, " -U \"%s\"", pguser);
> - #endif
> break;
>
> case 'v':
> --- 203,214 ----
>
>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2004-10-06 17:06:04 Re: pg_dumpall bug in PG 8.0b3 Win32 port
Previous Message PostgreSQL Bugs List 2004-10-06 14:41:59 BUG #1281: I cannot find the ODBC driver in available ODBC drivers

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-10-06 17:06:04 Re: pg_dumpall bug in PG 8.0b3 Win32 port
Previous Message Bruce Momjian 2004-10-06 16:42:08 Re: Win32 libpq/ssl fix