Tom Lane wrote:
> What you're talking about is a
> fairly specialized single-purpose feature, which nonetheless is going to
> require a lot of infrastructure (for example, teaching psql's \copy
> about it).
Well, that's hardly a lot.
> Perhaps, for approximately the same amount of overhead,
> we could provide something more general.
>
Ok.
> I don't agree with the idea of injecting something "behind" copy though.
> The thought that comes to mind for me is something "in front of" copy,
> that is, give it the text of each line and let it do a text-to-text
> transformation before COPY chews on it.
>
you mean some sort of filter mechanism?
COPY .... FILTER function_name ( args) ... ?
That might work. Then we could provide a couple builtin and people could
write others in C or PL/dujour.
cheers
andrew