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