Fixes for psql describeOneTableDetails

Started by Kris Jurkaover 17 years ago2 messageshackers
Jump to latest
#1Kris Jurka
books@ejurka.com

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

Attachments:

psql-fixes.patchtext/plain; charset=US-ASCII; name=psql-fixes.patchDownload+10-7
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#1)
Re: Fixes for psql describeOneTableDetails

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