Re: [HACKERS] Minor pg_dump buglet - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Minor pg_dump buglet
Date
Msg-id 199905101820.OAA04423@candle.pha.pa.us
Whole thread Raw
In response to Minor pg_dump buglet  (gjerde@icebox.org)
List pgsql-hackers
Sure, can you send us a patch:


> Also, in getTables() in pg_dump.c there are at least a couple of these:
>         if (!res ||
>                 PQresultStatus(res) != PGRES_COMMAND_OK)
>         {
>                 fprintf(stderr, "BEGIN command failed\n");
>                 exit_nicely(g_conn);
>         }
> 
> Shouldn't this be more like
>         if (!res ||
>                 PQresultStatus(res) != PGRES_COMMAND_OK)
>         {
>                 fprintf(stderr, "BEGIN command failed(%s)\n", PGresultErrorMessage(res));
>                 exit_nicely(g_conn);
>         }
> or
>         if (!res)
>         {
>                 fprintf(stderr, "BEGIN command failed\n");
>                 exit_nicely(g_conn);
>         } else if(PGresultStatus(res) != PGRES_COMMAND_OK) {
>                 fprintf(stderr, "BEGIN command failed.  ERROR: %s\n", PGresultErrorMessage(res));
>                 exit_nicely(g_conn);
>         }
> 
> Thanks,
> Ole Gjerde
> 
> 
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] INSERT INTO
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Oops, I seem to have changed UNION's behavior