From: | Matthias Apitz <guru(at)unixarea(dot)de> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | deep debug log for psql |
Date: | 2019-11-21 07:12:17 |
Message-ID: | 20191121071217.GA3646@c720-r342378 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
We found and use for ESQL/C the debug feature:
ECPGdebug(int on, FILE *stream);
with very good results. Is there something similar for the psql
interpreter to debug the query of complex SQL statements like this
monster here:
SELECT ha.hnr, count(*) FROM acq_haushalt ha, acq_booking bo WHERE ha.hjahr = 2000 AND ha.brgroup
WHERE bu.bnr = bo.bnr AND bu.band = bo.band AND bu.exemplar = ( SELECT min(bo2.exemplar) FROM acq_booking b
WHERE bo2.hnr = bo .hnr
AND bo2.bnr = bo.bnr AND bo2.band = bo.band)
AND bu.statusrech IN (0,1) )
GROUP BY ha.hnr;
The -L logfilename flag of psql is not sufficient enough. It logs only
the query and the final result.
Thanks
matthias
--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
"Glaube wenig, hinterfrage alles, denke selbst: Wie man Manipulationen durchschaut"
"Believe little, scrutinise all, think by your own: How see through manipulations"
ISBN-10: 386489218X
From | Date | Subject | |
---|---|---|---|
Next Message | Jill Jade | 2019-11-21 08:11:57 | Extract transaction from WAL |
Previous Message | Pavel Stehule | 2019-11-21 06:44:40 | Re: Return Table in StoredProceure/Function |