Re: Why doesn't COPY support the HEADER options for tab-separated output?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Joe Van Dyk <joe(at)tanga(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why doesn't COPY support the HEADER options for tab-separated output?
Date: 2013-08-12 22:18:16
Message-ID: 20130812221816.GD12496@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 12, 2013 at 03:17:00PM -0700, Jeff Janes wrote:
> On Mon, Aug 12, 2013 at 2:21 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Mon, Aug 12, 2013 at 02:15:25PM -0700, Joe Van Dyk wrote:
> >> Mostly just curious, as this is preventing me from using tab-separated output.
> >> I'd like there to be a header in my files. I have to use CSVs instead.
> >
> > [ "this" means the fact that COPY doesn't support the HEADER option. ]
> >
> > We assume CSV is going to be read into a tool that can use the header
> > names; delimited files don't usually have a use for those headers.
>
> There have been a few cases where I wanted this, too. I can see why
> implementing it is less important than having it for CSV, but is there
> a reason to consider this harmful for TEXT format? I.e. if someone
> submitted a patch, would it be rejected?

I see no reason _not_ to support it, so sure, either we add this to 9.4,
or add it to the TODO list.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-08-12 22:22:58 Re: Why doesn't COPY support the HEADER options for tab-separated output?
Previous Message Jeff Janes 2013-08-12 22:17:00 Re: Why doesn't COPY support the HEADER options for tab-separated output?