Re: Allow backend to output result sets in XML

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Allow backend to output result sets in XML
Дата
Msg-id 303E00EBDD07B943924382E153890E5434AA6B@cuthbert.rcsinc.local
обсуждение исходный текст
Ответ на Allow backend to output result sets in XML  (Brian Moore <brianmooreca@yahoo.com>)
Список pgsql-hackers
Peter Eisentraut wrote:
> I think "output XML" is just buzz.  Give us a real use scenario and an
> indication that a majority also has that use scenario (vs. the other
> ones listed above), then we can talk.

Consider:

create table person (name varchar primary key, age int);
create table account (number varchar primary key, name varchar
references person);
insert into person values ('Fred', 35);
insert into person values ('Barney', 37);
insert into account values ('1234', 'Fred');
insert into account values ('5678', 'Fred');
insert into account values ('abcd', 'Barney');

test=# select * from person into xml natural;
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<row n="1">
<person><name>Fred</name>     <age>35</age>     <account>         <number>1234</number>     </account>     <account>
    <number>5678</number>     </account> 
</person>
</row>
</result>
<row n="2">
[...]

now consider:
select * from person into xml natural  namespace is 'some_uri' schema is 'person.xsd';

this returns result set above, but with schema and namespace
declarations included.  Of course, there is tons of complexity hiding in
there, but is this worth considering?

Merlin





В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: testing mail relays ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CTTAS w/ DISTINCT ON crashes backend