| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Greg Smith <gsmith(at)gregsmith(dot)com> |
| Cc: | FAST PostgreSQL <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>, pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: COPY-able csv log outputs |
| Date: | 2007-05-21 03:47:50 |
| Message-ID: | 28137.1179719270@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Greg Smith <gsmith(at)gregsmith(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | db | 2007-05-21 05:58:04 | Re: UTF8MatchText |
| Previous Message | Andrew Dunstan | 2007-05-21 03:22:53 | Re: COPY-able csv log outputs |