Thread: Fixes for psql describeOneTableDetails

Fixes for psql describeOneTableDetails

From
Kris Jurka
Date:
Attached are two and a half fixes for problems in psql's 
describeOneTableDetails function.

1) After PQclear(res) we must null res out, so that later error handling 
cleanup doesn't try to PQclear it again.

2) In error cleanup we cannot call printTableCleanup unless we've called 
printTableInit.

3) When describing a sequence it queries the sequence by name and was not 
schema qualifying it which is necessary when describing objects not in the 
search path.  This is still busted because it does not correctly quote the 
identifiers.

Kris Jurka

Re: Fixes for psql describeOneTableDetails

From
Tom Lane
Date:
Kris Jurka <books@ejurka.com> writes:
> Attached are two and a half fixes for problems in psql's 
> describeOneTableDetails function.

Applied, thanks.

> 3) When describing a sequence it queries the sequence by name and was not 
> schema qualifying it which is necessary when describing objects not in the 
> search path.  This is still busted because it does not correctly quote the 
> identifiers.

I fixed the quoting problem by using fmtId(), which seems to have been
sucked into psql awhile back.
        regards, tom lane