Re: COPY with column headings

From: CSN <cool_screen_name90001(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY with column headings
Date: 2004-08-17 04:33:03
Message-ID: 20040817043303.71469.qmail@web52903.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


That'd likely be useful. Either specify the column
names with COPY or \copy, or put them in the data file
and pass an option to the command to look for them.
The only time this could be a problem is if you forget
to tell COPY to look for the field names in the file
(AND specify the field names to COPY), and the values
for the field names are such that they don't cause
data errors (probably pretty slim chance).

I'd also really like to see the ability to specify
default values for fields not included in the data
file (field defaults in the table definition is
limited and doesn't fill the order when you need to
specify various foreign key ids, specific times,
etc.).

CSN

>>>>>>>>>>>>>>>>>>>
Someone just asked about a COPY capability to supply
the column headings
as the first line of the copy statement. Do we want
to support
something like that? Does anyone else want such functionality?


__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

Browse pgsql-hackers by date

  From Date Subject
Next Message Hicham G. Elmongui 2004-08-17 08:36:27 Re: pulling projection up in plans
Previous Message Marc G. Fournier 2004-08-17 00:43:24 Re: Release notes for upgrading