Peter Eisentraut <peter_e@gmx.net> writes:
> I also think that psql is not the place to implement something like this.
Agreed.
> It's most likely best put in the backend, as a function like
> xmlfoo('select * from t1;')
That seems a little bizarre. Wouldn't we want to have a switch that
just flips the SELECT output format from one style to the other?
This is also a good time to stop and ask whether the frontend/backend
protocol needs to change to support this. Not having read the spec,
I have no idea what the low-level transport needs are for XML output,
but I suspect our present protocol is not it ...
regards, tom lane