On 2012-01-06, Phoenix Kiula <phoenix.kiula@gmail.com> wrote:
> On Fri, Jan 6, 2012 at 6:53 PM, Steve Crawford
><scrawford@pinpointresearch.com> wrote:
> Thanks Steve.
>
> The file has 350 million lines. Sed, Awk etc are a little painful when
> the file is 18GB witht hat many lines.
On files of that size they're a lot nicer than an interactive editor.
It's not like you need to find space on the disk for an edited copy:
(
echo "copy table_name from stdin other_parameters; "
cat bigfile | sed script_or_scriptfile
echo '\\.'
) | psql connection_parameters
> I'd want Postgresql to ignore the line altogether when something is
> missing. Is this an option we can use, or are rules hoisted on us?
The copy command is optimised and intended for use with data that is
known to be good, or atleast acceptable to the database.
--
⚂⚃ 100% natural