pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: toni hernández <toni@sigte.udg.edu>
To: pgsql-admin@postgresql.org
Subject: Re: copy command and column attribute
Date: Tue, 31 Mar 2009 09:39:55 +0200
Message-ID: <49D1C8CB.4000402@sigte.udg.edu> (raw)
In-Reply-To: <200903301740.05087.guillaume@lelarge.info>
References: <49D0D9BF.20407@sigte.udg.edu>
	<200903301740.05087.guillaume@lelarge.info>


Thanks a lot Guillaume,

It worked!!

Guillaume Lelarge escribió:
> Le lundi 30 mars 2009 à 16:39:59, toni hernández a écrit :
>   
>> [...]
>> I've been trying to import some data from a csv file to my database.
>> I have some fields of the table that I want to keep so I typed
>>
>> copy mytable (column
>> Affidabilita_stratigrafica,Ambiente,Anno,Componenti_geologici) FROM
>> E'c://export_us_sg4.csv' with delimiter ',' csv quote as '"';
>>
>> This way I expect some fields to remain with the default value, but an
>> error appears near "column"
>>
>> Am I typing it wrong?
>>     
>
> Yes, there should be no COLUMN keyword in this statement.
>
> copy mytable (Affidabilita_stratigrafica,Ambiente,Anno,Componenti_geologici)
> FROM E'c://export_us_sg4.csv' with delimiter ',' csv quote as '"';
>
> This should work better.
>
>
>   



view thread (3+ messages)

Message-ID: <49D1C8CB.4000402@sigte.udg.edu>
Permalink:  ../49D1C8CB.4000402@sigte.udg.edu/
Also on:    postgresql.org/message-id/49D1C8CB.4000402@sigte.udg.edu

 · 

reply

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-admin@postgresql.org
  Cc: toni@sigte.udg.edu
  Subject: Re: copy command and column attribute
  In-Reply-To: <49D1C8CB.4000402@sigte.udg.edu>

* 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