Re: [PATCHES] [HACKERS] Patch for psql.c - Mailing list pgsql-hackers

From Igor
Subject Re: [PATCHES] [HACKERS] Patch for psql.c
Date
Msg-id ba30f0850f148119a4d6860c34aa866d
Whole thread Raw
List pgsql-hackers
You might have been right though moving it outside and
putting if(results) PQclear(results)... Just need to test it...

>
> OK, sorry, just dug through a bit more.  OK; in the case of
> PGRES_NONFATAL_ERROR, the results have already been freed.  In that case,
> I guess that the lines should be
>
>     case PGRES_FATAL_ERROR:
>     case PGRES_BAD_RESPONSE:
>         PQclear(results);
>     case PGRES_NONFATAL_ERROR:
>         *success_p = false;
>         fprintf(stderr, "%s", PQerrorMessage(settings->db));
>         break;
>
> leaving the PQclears inside the switch.
>
> My apologies for denseness.
>
> -Tymm
>
>

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

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [PATCHES] [HACKERS] Patch for psql.c
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] 6.1 issues resolved