Re: xmlElement and \n - Mailing list pgsql-sql

From Luca Ferrari
Subject Re: xmlElement and \n
Date
Msg-id CAKoxK+4XfYuj8ZJS=abL5hF3h0TvOMoRi28+WF3BA5q9tenoWQ@mail.gmail.com
Whole thread Raw
In response to xmlElement and \n  (Enrico Oliva <oliva.enrico@gmail.com>)
List pgsql-sql
On Thu, Sep 19, 2013 at 9:46 AM, Enrico Oliva <oliva.enrico@gmail.com> wrote:

> I would like to have
> <IDXS>
>       <IDX name="as001_c01pk">
>       <IDX_IS_UNIQUE>Yes</IDX_IS_UNIQUE>
> ...

I'm not sure there is an indenting facility, since indentation
strongly depends on what the user think about.
However you can concatenate a new line at each xmlelement call:

SELECT xmlelement(name foo, xmlattributes(current_date as bar),
'cont', 'ent') || chr(10) || 'hello world'

Luca



pgsql-sql by date:

Previous
From: Enrico Oliva
Date:
Subject: xmlElement and \n
Next
From: ssylla
Date:
Subject: detect initiator of update/delete action