Re: [HACKERS] XML export function signatures

2007-02-12 Thread Peter Eisentraut
Tommy Gildseth wrote: > How do you define the table name when fetching data using a join, > union etc. where the data doesn't necessarily originate from a single > table? If you use the query_to_xml function, then I just write "" without any particular name. > Another neat feature would be if yo

Re: [HACKERS] XML export function signatures

2007-02-12 Thread Tommy Gildseth
Peter Eisentraut wrote: tableforest = false gives you something like ... tableforest = true gives you something like ... ... ... How do you define the table name when fetching data using a join, union etc. where the data doesn't necessarily originate from a single table? Could

Re: [HACKERS] XML export function signatures

2007-02-12 Thread Peter Eisentraut
Andrew Dunstan wrote: > . table_to_xml_and_xmlschema seems like a mouthful - can we shorten > it a bit? Well, it gives you back a mouthful of data, too. :) > . what are the two ways of representing data that tableforest > distinguishes? tableforest = false gives you something like data

Re: [HACKERS] XML export function signatures

2007-02-12 Thread Andrew Dunstan
Peter Eisentraut wrote: Here are the proposed signatures for the XML export functions. While I have seen the output formats in use elsewhere, I could not find any useful information on how to invoke these mappings, so the following is purely my own invention. table_to_xml(tbl regclass, nulls

[HACKERS] XML export function signatures

2007-02-12 Thread Peter Eisentraut
Here are the proposed signatures for the XML export functions. While I have seen the output formats in use elsewhere, I could not find any useful information on how to invoke these mappings, so the following is purely my own invention. table_to_xml(tbl regclass, nulls boolean, tableforest boolean

Re: [HACKERS] XML export

2007-02-11 Thread Peter Eisentraut
Tino Wildenhain wrote: > > > > linda > > 19 > > (0.9,6.1) > > 100 > > ^ > > > How would you express null in the values above? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadc

Re: [HACKERS] XML export

2007-02-11 Thread Tino Wildenhain
Peter Eisentraut schrieb: The issue of XML export has been discussed a few times throughout history. Right now you've got the HTML output in psql. A few people have proposed "real" XML output formats in psql or elsewhere. I dug out some old code today that implements what SQL/XML has to say on

Re: [HACKERS] XML export

2007-02-11 Thread Peter Eisentraut
Pavel Stehule wrote: > I thought about some special function. But why not? COPY is perfect > for this task. I don't understand what you are asking for. Please show an example. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [HACKERS] XML export

2007-02-11 Thread Pavel Stehule
Pavel Stehule wrote: > If you integrate xml_export to core, you don't need string argument, > which isn't too handy, but you can use COPY stmt aparat. I don't > speak about enhancing stmt COPY. Then what do you speak about? I thought about some special function. But why not? COPY is perfect fo

Re: [HACKERS] XML export

2007-02-11 Thread Peter Eisentraut
Pavel Stehule wrote: > If you integrate xml_export to core, you don't need string argument, > which isn't too handy, but you can use COPY stmt aparat. I don't > speak about enhancing stmt COPY. Then what do you speak about? -- Peter Eisentraut http://developer.postgresql.org/~petere/ --

Re: [HACKERS] XML export

2007-02-11 Thread Pavel Stehule
Hello If you integrate xml_export to core, you don't need string argument, which isn't too handy, but you can use COPY stmt aparat. I don't speak about enhancing stmt COPY. Regards Pavel Stehule p.s. it's can be great if xmloutput will be independent on datestyle root=# set datestyle TO Germ

Re: [HACKERS] XML export

2007-02-10 Thread David Fetter
On Sat, Feb 10, 2007 at 11:35:08AM -0800, Joshua D. Drake wrote: > Peter Eisentraut wrote: > > The issue of XML export has been discussed a few times throughout > > history. Right now you've got the HTML output in psql. A few > > people have proposed "real" XML output formats in psql or elsewhere

Re: [HACKERS] XML export

2007-02-10 Thread Peter Eisentraut
Andrew Dunstan wrote: > How do you treat columns whose names are not legal XML names? There are escape mechanisms in place. You can verify yourself how they work using select xmlelement(name "something unusual"); > I'm glad to see you treat NULL as an attribute - that's definitely > the right

Re: [HACKERS] XML export

2007-02-10 Thread Andrew Dunstan
Peter Eisentraut wrote: Below are examples of what it can do. I'm thinking about hosting this on PgFoundry, but if the crowd thinks this should be somewhere else, short of the moon, let me know. How do you treat columns whose names are not legal XML names? I'm glad to see you treat N

Re: [HACKERS] XML export

2007-02-10 Thread Stefan Kaltenbrunner
Peter Eisentraut wrote: > The issue of XML export has been discussed a few times throughout > history. Right now you've got the HTML output in psql. A few > people have proposed "real" XML output formats in psql or elsewhere. > > I dug out some old code today that implements what SQL/XML has to

Re: [HACKERS] XML export

2007-02-10 Thread Dave Page
Joshua D. Drake wrote: > Peter Eisentraut wrote: >> The issue of XML export has been discussed a few times throughout >> history. Right now you've got the HTML output in psql. A few >> people have proposed "real" XML output formats in psql or elsewhere. >> >> I dug out some old code today that im

Re: [HACKERS] XML export

2007-02-10 Thread Theo Schlossnagle
On Feb 10, 2007, at 2:35 PM, Joshua D. Drake wrote: Peter Eisentraut wrote: The issue of XML export has been discussed a few times throughout history. Right now you've got the HTML output in psql. A few people have proposed "real" XML output formats in psql or elsewhere. I dug out some old

Re: [HACKERS] XML export

2007-02-10 Thread Joshua D. Drake
Peter Eisentraut wrote: > The issue of XML export has been discussed a few times throughout > history. Right now you've got the HTML output in psql. A few > people have proposed "real" XML output formats in psql or elsewhere. > > I dug out some old code today that implements what SQL/XML has to

[HACKERS] XML export

2007-02-10 Thread Peter Eisentraut
The issue of XML export has been discussed a few times throughout history. Right now you've got the HTML output in psql. A few people have proposed "real" XML output formats in psql or elsewhere. I dug out some old code today that implements what SQL/XML has to say on the matter and fitted the c