Re: Practical error logging for very large COPY

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Practical error logging for very large COPY
Дата
Msg-id 4383EDB6.8050405@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: Practical error logging for very large COPY  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
> Actually, there are really only a few errors people want to trap I
> imagine:
> 
> - CHECK constraints (all handled in ExecConstraints)
> - Duplicate keys
> - Foreign key violations (all handled by triggers)
> 
> Rather than worry about all the events we can't safely trap, how about
> we simply deal with the handful that are trappable. For example, we let
> people create an ON ERROR trigger and use the existing trigger
> interface. We have three possibilities:

Trap as many as we can and in the 'rejects' table have an 'sqlstate' 
field that has the SQLSTATE code generated by the failure.  That way you 
can trivially look for all the ones that failed for whatever reason you 
like.

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Practical error logging for very large COPY statements
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: A few pgindent oddities