Re: Ragged CSV import - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Ragged CSV import
Date
Msg-id 4AA8721C.1060106@dunslane.net
Whole thread Raw
In response to Re: Ragged CSV import  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Ragged CSV import
List pgsql-hackers

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


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: LATERAL
Next
From: Tom Lane
Date:
Subject: Re: Ragged CSV import