Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Bugs > Re: BUG #4115: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 3716 of 4088
Post > Topic >>

Re: BUG #4115: PostgreSQL ISO format is not really ISO

by peter_e@[EMAIL PROTECTED] (Peter Eisentraut) Apr 20, 2008 at 05:31 PM

Daniel Ruoso wrote:
> On the other hand, some im****tant ISO8601-based specifications only
> accept the dateTtime notation, for instance XML Schema.
>
> As I was talking on #postgresql, I think it would be nice to have that
> output option as one of the date/time output styles (name it ISO8601 or
> ISO-strict), and it really doesn't need to be the default (the way pg
> uses it now is nice for the human reader).

The fact that you can alter the date/time output format at all is really
quite 
a legacy feature, and its use should be frowned upon in contem****ary 
applications.  Although we don't declare this anwhere, the "ISO" should be

read to refer to ISO 9075, which is the SQL standard, and that specifies 
exactly the format we use.  All the other formats are a transitional
measure 
from legacy behavior.  Using them nowadays will make your application 
incompatible with the SQL standard and it will break various client
drivers.

If you need a different output format, use a formatting function or some
other 
post-output formatting mechanism.  As a note, the SQL-to-XML Schema
coverter 
uses the correct format that you are looking for:

peter=> SELECT query_to_xml('select localtimestamp', false, false, '');
                         query_to_xml
---------------------------------------------------------------
 <table xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 <row>
   <timestamp>2008-04-20T17:26:21.187424</timestamp>
 </row>

 </table>

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
 




 4 Posts in Topic:
BUG #4115: PostgreSQL ISO format is not really ISO
daniel@[EMAIL PROTECTED]   2008-04-19 11:38:24 
Re: BUG #4115: PostgreSQL ISO format is not really ISO
systemguards@[EMAIL PROTE  2008-04-19 12:10:34 
Re: BUG #4115: PostgreSQL ISO format is not really ISO
daniel@[EMAIL PROTECTED]   2008-04-19 22:52:00 
Re: BUG #4115: PostgreSQL ISO format is not really ISO
peter_e@[EMAIL PROTECTED]  2008-04-20 17:31:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 23:24:27 CDT 2008.