From: Tom Lane <tgl@sss.pgh.pa.us>
To: marchesini@unipg.it
Cc: pgsql-sql@postgresql.org
Subject: Re: COPY tablename FROM and null values
Date: Wed, 22 Mar 2006 09:52:13 -0500
Message-ID: <16349.1143039133@sss.pgh.pa.us> (raw)
In-Reply-To: <1143026331.4730.23.camel@geologia5.agora.ing.unipg.it>
References: <1143026331.4730.23.camel@geologia5.agora.ing.unipg.it>
ivan marchesini <marchesini@unipg.it> writes:
> I have a .txt file, containing some tabular data, where data are
> delimited by TABs.
> there are 3 columns:
> column1 int4, column2 float8, column3 float8
> the problem is that column3 contains also null values (i.e. sometimes is
> empty)
This should work, unless the file is set up so that the second TAB is
missing when column3 is "empty". If so, you'll need to fix that.
COPY is going to complain if there aren't exactly two TABs on every
line.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, marchesini@unipg.it
Subject: Re: COPY tablename FROM and null values
In-Reply-To: <16349.1143039133@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox