Re: Output filter for psql

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Output filter for psql
Date: 2009-01-28 22:40:26
Message-ID: 4980DEDA.7060609@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

D'Arcy J.M. Cain wrote:
> On Wed, 28 Jan 2009 14:08:54 -0500
> Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>> D'Arcy J.M. Cain wrote:
>>
>>> I suppose we could define another line with options that we could
>>> define for meta information such as the border setting and the table
>>> name and whatever we define later. E.g:
>>>
>>> "table:person","border:3","funky:option with \":\""
>>>
>> Why do you want to add this extra information? psql doesn't output it
>> now, and IIRC your original proposal didn't do it either.
>>
>
> It mentioned including meta information. I'm not sure that I really
> care if I get it but we may want it in general, if not now then later,
> and it would be something that would be extremely hard to retrofit. If
> we start out with just the table and perhaps the border setting we can
> always add more later if we find we need it. If we don't start with
> something then adding an extra line later will cause all sorts of
> heartache.
>
>

For CSV it's likely to cause a headache right at the start. CSV with a
single header line is a well known and mostly understood format. I don't
know of any CSV processor (including ours) that handles more than one
header line.

This is actually an example of why XML is not such a bad choice. It is
rich enough that a processor is unlikely to be confused by metadata, and
capable of being turned into almost any other format you might want with
little difficulty.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-28 22:40:34 Re: 8.4 release planning
Previous Message Bruce Momjian 2009-01-28 22:39:45 Re: 8.4 release planning