Re: Add support for logging the current role

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add support for logging the current role
Date: 2011-02-14 00:28:01
Message-ID: 4D587711.8000103@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/13/2011 08:26 AM, Stephen Frost wrote:
> This would be called a 'header' in most typical CSV scenarios.
> Unfortunately, last I checked (maybe it's changed?), COPY w/ HEADER just
> throws the header away instead of doing anything useful with it. If it
> actually used the header to build the column list, then adding a header
> would be sufficient, provided all the necessary fields are in the table.

See the discussion back around the the 8.1 release (IIRC) when we added
the HEADER option.

> If I wanted something to throw away the first record of a file before
> loading it, I'd use tail.
>

The whole point of us having direct CSV import is to minimise the
requirement for preprocessing.

That said, I think there's probably a good case for an option to use the
header line as a column list. I know of at least one application I have
written that could benefit from it. But that's work for 9.2 or later.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2011-02-14 00:42:41 Re: Extensions vs PGXS' MODULE_PATHNAME handling
Previous Message Tom Lane 2011-02-14 00:27:41 Re: Scheduled maintenance affecting gitmaster