Re: xml queries & date format

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Jef Peeraer" <jef(dot)peeraer(at)telenet(dot)be>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: xml queries & date format
Date: 2008-09-11 12:58:13
Message-ID: 162867790809110558n5a882a6axa1521b0c890979d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/9/11 Jef Peeraer <jef(dot)peeraer(at)telenet(dot)be>:
>
>
> On Thu, 11 Sep 2008, Peter Eisentraut wrote:
>
>> Jef Peeraer wrote:
>> >
>> > On Thu, 11 Sep 2008, Peter Eisentraut wrote:
>> >
>> > > Tom Lane wrote:
>> > > > Jef Peeraer <jef(dot)peeraer(at)telenet(dot)be> writes:
>> > > > > i am using the xml add-ons, but the date output format seems to be
>> > > > > wrong :
>> > > > I think the conversion to xml intentionally always uses ISO date format,
>> > > > because that's required by some spec somewhere.
>> > > Yes, it follows XML Schema. Which is why the output format is even
>> > > slightly
>> > > different from the SQL-mandated ISO format.
>> > i understand, but that makes it very difficult to change the date format
>> > afterwards. i simple flag to indicate no date conversion would be
>> > helpfull....
>>
>> Well, these table_to_xml etc. functions are heavily constrained by the SQL
>> standard, XML Schema, and others. They do what they are supposed to do. You
>> are free to design your own XML export format or apply postprocessing to the
>> existing ones (XSLT?). I don't think we should overload the existing
>> functions with everyone's favorite but apparently completely nonstandard
>> formatting variant flag.
> it would be a flag to indicate no conversion from the datestyle settings
> in the database...i think, from a users perspective, the table_to_xml is
> completely useless, if you have to reformat everything afterwards....

I am not sure - mostly people should generate "valid" xml file.
Sending invalid dates in XML is wrong.

Pavel

>
> jef
> >
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2008-09-11 13:58:38 Re: xml queries & date format
Previous Message Jef Peeraer 2008-09-11 12:29:45 Re: xml queries & date format