Re: Improvement for COPY command .. unless it already exists

From: David Gagnon <dgagnon(at)siunik(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Improvement for COPY command .. unless it already exists
Date: 2005-04-07 14:33:13
Message-ID: 425544A9.1050808@siunik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I want to default some columns for this COPY command only. So DEFAULT
is not appropriate in this case. In fact I think you suggested a
workaround right ? Doing an alter table before and another one after
will work ... not fully clean thought since my user may not have the
write to modify the table. Being able to specify default values
directly in the COPY command will be really nice :-) I just wanted to
share my tought :-)

Being eable to read zipped file will be cool to .. but I'm not sure it's
Chrismas yet right so I didn't ask ;-)

Thanks for your help
/David

Tom Lane wrote:

>David Gagnon <dgagnon(at)siunik(dot)com> writes:
>
>
>>Is there a way to specify default values in the COPY command?
>>
>>
>
>There's always ALTER TABLE ... SET DEFAULT.
>
> regards, tom lane
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Parker 2005-04-07 14:38:58 WAL on a RAM disk
Previous Message Tom Lane 2005-04-07 14:15:33 Re: Improvement for COPY command .. unless it already exists (If yes please tell me!)