\encoding UTF8
COPY (SELECT query_to_xml('SELECT kod as id, lang_0000040e as nev, iif(hasznalatban=0,1,0) as deleted
   FROM szallitasmod
   WHERE ((lasteditedtime_forsync + interval ''12 hours'') > current_timestamp)
   ORDER BY 1
', true, false, '')) to '/tmp/flexovit_szallitasmod_changed.xml'