query_to_xml function ignores Datestyle?

Started by Esmin Gracicover 15 years ago2 messagesgeneral
Jump to latest
#1Esmin Gracic
esmin.gracic@gmail.com

It seems that query_to_xml function ignores Datestyle settings?
Is this correct? If yes, is there any workarounf except
to_char(date,'dd.mm.yyyy');

set datestyle = 'German';
select current_date;
select QUERY_TO_XML('select current_date',true,false,'');

Postgresql 9.0 on Ubuntu 10.04 Server (64-bit)

Esmin Gracić

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Esmin Gracic (#1)
Re: query_to_xml function ignores Datestyle?

Hello

2011/1/1 Esmin Gracic <esmin.gracic@gmail.com>:

It seems that query_to_xml function ignores Datestyle settings?
Is this correct? If yes, is there any workarounf except
to_char(date,'dd.mm.yyyy');

xsd define format for date, so you have to use a to_char function or
just cast to text.

Regards

Pavel Stehule

Show quoted text

set datestyle = 'German';
select current_date;
select QUERY_TO_XML('select current_date',true,false,'');

Postgresql 9.0 on Ubuntu 10.04 Server (64-bit)

Esmin Gracić