Skip site navigation (1) Skip section navigation (2)

Re: Copy Comand question

From: Sharon Cowling <sharon(dot)cowling(at)sslnz(dot)com>
To: John Taylor <postgres(at)jtresponse(dot)co(dot)uk>
Cc: "Pgsql-Novice (E-mail)" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy Comand question
Date: 2002-05-28 06:27:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

I didn't think that copy did it, I'm adding the headings via a shell script.  
Thanks for your suggestion.


Sharon Cowling

Quoting John Taylor <postgres(at)jtresponse(dot)co(dot)uk>:

> On Sunday 26 May 2002 04:22, you wrote:
> > On Sat, 2002-05-25 at 18:38, Sharon Cowling wrote:
> > > Hi,
> > > 
> > > I am using the copy command to create a .csv file, how do I include the
> table headings, or headings of my choice? 
> > > The purpose of this paticular .csv file is to enable the users to
> download data from a web page and then report on it using MS Excel.  It works
> fine apart from not having any headings, which the users need as there can be
> a lot of data in the .csv file.
> > 
> > It's not possible. COPY is meant to dump raw data from a table.
> > 
> I know it is a bit of a bodge - but ...
> How about having a heading table.
> Then create a view which is a union to the two tables, and copy out the
> view.
> JohnT
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

This mail sent through IMP:

In response to

pgsql-novice by date

Next:From: Tim WilsonDate: 2002-05-28 15:18:45
Subject: deleted table remnants
Previous:From: John TaylorDate: 2002-05-27 19:05:07
Subject: Re: Full Outer Joins

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group