Re: patches for items from TODO list

From: "Sergey Ten" <sergey(at)sourcelabs(dot)com>
To: "'Markus Bertheau'" <twanger(at)bluetwanger(dot)de>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'Christopher Kings-Lynne'" <chriskl(at)familyhealth(dot)com(dot)au>, <pgsql-hackers(at)postgresql(dot)org>, <jason(at)sourcelabs(dot)com>
Subject: Re: patches for items from TODO list
Date: 2005-05-18 20:27:55
Message-ID: 200505182021.j4IKLJXW026519@sourcelabs.sourcelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Markus,

Thank you for your reply.
We considered embedding of an XML schema first followed by data. We decided
to stick to our current data format to make sure stateless XML parsers can
process it as well. Would it be better to add an option to the COPY command,
to allow embedding an XML schema, so more advanced XML parsers can take
advantage of it?

Thanks,
Jason, Sergey

> -----Original Message-----
> From: Markus Bertheau [mailto:twanger(at)bluetwanger(dot)de]
> Sent: Tuesday, May 17, 2005 6:00 PM
> To: Sergey Ten
> Cc: 'Bruce Momjian'; 'Christopher Kings-Lynne'; pgsql-
> hackers(at)postgresql(dot)org; jason(at)sourcelabs(dot)com
> Subject: Re: [HACKERS] patches for items from TODO list
>
> Dnia 13-05-2005, pią o godzinie 16:01 -0700, Sergey Ten napisał(a):
>
> > <?xml version='1.0'?>
> > <table>
> > <row>
> > <col name='col1' null='n'>Jackson, Sam</col>
> > <col name='col2' null='n'>\h</col>
> > </row>
> > <row>
> > <col name='col1' null='n'>It is &quot;perfect&quot;.</col>
> > <col name='col2' null='n'>&#09;</col>
> > </row>
> > <row>
> > <col name='col1' null='n'></col>
> > <col name='col2' null='y'></col>
> > </row>
> > </table>
>
> Why didn't you do something to the effect of
>
> <?xml version='1.0'?>
> <table>
> <cols>
> <col name='col1'/>
> <col name='col2'/>
> </cols>
> <row>
> <col null='n'>Jackson, Sam</col>
> <col null='n'>\h</col>
> </row>
> <row>
> <col null='n'>It is &quot;perfect&quot;.</col>
> <col null='n'>&#09;</col>
> </row>
> <row>
> <col null='n'></col>
> <col null='y'></col>
> </row>
> </table>
>
> This avoids repeating the column names in every row, which don't change
> over the rows anyway. By reducing redundant information it also makes
> structurally invalid XML less likely (whether that is relevant depends
> on what people do with the XML data).
>
> Also you could encode the XML output as UTF-8, which would make the
> files more readable for humans if the text data is not ASCII.
>
> Markus
>
> --
> Markus Bertheau <twanger(at)bluetwanger(dot)de>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2005-05-18 20:40:05 Re: Image storage questions
Previous Message Ed L. 2005-05-18 20:23:23 Re: Image storage questions

Browse pgsql-patches by date

  From Date Subject
Next Message Sergey Ten 2005-05-18 20:42:57 Re: patches for items from TODO list
Previous Message Alvaro Herrera 2005-05-18 13:40:12 Re: Refactoring in lock.c