Re: pg_dumpall bug in PG 8.0b3 Win32 port - Mailing list pgsql-patches
| From | Luiz K. Matsumura |
|---|---|
| Subject | Re: pg_dumpall bug in PG 8.0b3 Win32 port |
| Date | |
| Msg-id | 4163EA48.5070001@planit.com.br Whole thread Raw |
| In response to | Re: pg_dumpall bug in PG 8.0b3 Win32 port (Andrew Dunstan <andrew@dunslane.net>) |
| Responses |
Re: pg_dumpall bug in PG 8.0b3 Win32 port
Re: pg_dumpall bug in PG 8.0b3 Win32 port |
| List | pgsql-patches |
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 ----
pgsql-patches by date: