Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 0E6809F972F for ; Sat, 1 Sep 2007 20:48:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 55082-06 for ; Sat, 1 Sep 2007 20:48:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by postgresql.org (Postfix) with ESMTP id 1E6859F960F for ; Sat, 1 Sep 2007 20:48:51 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so1055184wxc for ; Sat, 01 Sep 2007 16:48:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CQOLXgPYy1uCB8k50AtMrKRzGRZuX8SJxiTK2HlB8/48HSxr4mGqG/6xzuHDbGikuqL/dHkgXyrSJgWB1QjI+yK5B+MljwlQAbrrl08SmFA8gIyy8QkSXkKvVlfk7Y1fX5E2XQHtj71r3YFqdsiYahtEecx0LC9v77/X7bsiNUI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=U3xdIxy4rdVH1e7WeQj45pWnBvP0b2iFVNIcnAe9ci5ycZ7d7XoJfJ3p69aUQvs/jbjce0hvR/pTmk3rHosmzt12tiq5WQp7DkKK/08N59GtE6YzjsoYJPbdXm00zxaDh87IS53UCIsZUI+7bcXgV4ZVxqhPurj2BehNQ2+XbcY= Received: by 10.70.111.2 with SMTP id j2mr5328664wxc.1188690526200; Sat, 01 Sep 2007 16:48:46 -0700 (PDT) Received: by 10.70.90.15 with HTTP; Sat, 1 Sep 2007 16:48:45 -0700 (PDT) Message-ID: <4544e0330709011648r797a16b8l7bc9792a01983563@mail.gmail.com> Date: Sat, 1 Sep 2007 18:48:45 -0500 From: "Peter Koczan" To: "Khan, Mahmood Ahram" Subject: Re: XML output ? Cc: pgsql-admin@postgresql.org, pgsql-admin-owner@postgresql.org, tgl@sss.pgh.pa.us In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/1 X-Sequence-Number: 26762 > Is it possible to generate the output of SQL statements in PostgreSQL to XML > output? > > If anybody has came across with this or worked on it? Or anybody has any > Documentation for that? Yes, you can either install the xml2 contrib module for current versions, or if you can hold out until 8.3, there will be functions for xml output built into postgres. Check out http://developer.postgresql.org/pgdocs/postgres/functions-xml.html and http://developer.postgresql.org/pgdocs/postgres/datatype-xml.html for the upcoming 8.3 stuff. I couldn't find anything on xml2 quickly, but I'm sure a few minutes of searching will help you find what you need. Peter