I am working on postgresql function where i want to return a xml.
CREATE OR REPLACE FUNCTION schema.func_name(
ws_queue_array character varying DEFAULT NULL::character(1),
OUT ws_out_xml_data xml)
RETURNS xml
I am creating an xml using xml function in postgreql but I am not sure how will I return that xml.
SELECT XMLELEMENT (NAME "name",
XMLAGG (XMLELEMENT(NAME "var1",
XMLATTRIBUTES (
c_name AS "c name",
c_id AS "c ID"))
ORDER BY c_id ASC))
INTO OUT_XML_DATA;
How do i return this OUT_XML_DATA?
RETURN OUT_XML_DATAcommand in the end of your function.