Re: Continue transactions after errors in psql
От | Michael Paesold |
---|---|
Тема | Re: Continue transactions after errors in psql |
Дата | |
Msg-id | 005201c522f2$ec8a16f0$0a01a8c0@zaphod обсуждение исходный текст |
Ответ на | Re: Continue transactions after errors in psql ("Greg Sabino Mullane" <greg@turnstep.com>) |
Ответы |
Re: Continue transactions after errors in psql
Re: Continue transactions after errors in psql |
Список | pgsql-patches |
Greg Sabino Mullane wrote: > Finally had a chance to sit down at look at this afresh, and I'm > pretty sure I've got all the kinks worked out this time. Apologies > for not attaching, but my mail system is not working well enough > at the moment. So, please try to break this patch: > > http://www.gtsm.com/pg/psql_error_recovery.diff Some suggestions in random order: * I think you should use PSQLexec instead of using PQexec directly. PSQLexec is used by all \-commands and prints out queries with -E, which is very helpful for debugging. -E display queries that internal commands generate * You do not check for the server version before activating \reseterror. -> use PQserverVersion() to check for >= 80000 * Perhaps the name should be \reseterrors (plural)? Just my personal opinion though. * If I read the code correctly, you now don't destroy user savepoints anymore, but on the other hand, you do not release the psql savepoint after a user-defined savepoint is released. In other words, each time a user creates a savepoint, one psql savepoint is left on the subxact stack. I don't know if this is a real problem, though. * You have not yet implemented a way to savely put \reseterror in .psqlrc. I previously suggested an AUTO setting (additional to ON/OFF) that disables \reseterror when reading from a non-tty. So putting \reseterror AUTO in .psqlrc would be save. Otherwise, I could not find a way to break it. :-) Best Regards, Michael Paesold
В списке pgsql-patches по дате отправления: