Re: COPY-able csv log outputs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY-able csv log outputs
Дата
Msg-id 28137.1179719270@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COPY-able csv log outputs  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-patches
Greg Smith <gsmith@gregsmith.com> writes:
> The most fundamental issue I have with the interface is that using COPY
> makes it difficult to put any unique index on the resulting table. I like
> to have a unique index on my imported log table because it rejects the
> dupe records if you accidentally import the same section of log file
> twice.  COPY tosses the whole thing if there's an index violation, which
> is a problem during a regular import because you will occasionally come
> across lines with the same timestamp that are similar in every way except
> for their statment; putting an index on the timestamp+statement seems
> impractical.

Essentially the above is arguing that you want a unique index but you
can't be bothered to invent an actually-unique key.  This doesn't seem
a sound argument to me.  If we need a unique key, let's find one.

            regards, tom lane

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: COPY-able csv log outputs
Следующее
От: db@zigo.dhs.org
Дата:
Сообщение: Re: UTF8MatchText