pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedXml Schemas
2+ messages / 2 participants
[nested] [flat]
* Xml Schemas
@ 2009-06-06 19:53 Isaac Dover <isaacdover@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Isaac Dover @ 2009-06-06 19:53 UTC (permalink / raw)
To: pgsql-sql
Hello, I am attempting to build an xml representation of any database, but
I'm having trouble doing so. I was interested in using the existing xml
functions, such as "schema_to_xmlschema", but the results are strange and
unusable. The resulting schema doesn't even contain the column names, though
it doesn't include the table names. Often, the type information is
incomplete as well.
Are there any examples for using this family of functions,
"schema_to_xmlschema", etc? My end goal is any xml representation of the
database that includes type information.
Thanks,
Isaac
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Xml Schemas
@ 2009-06-08 20:53 Peter Eisentraut <peter_e@gmx.net>
parent: Isaac Dover <isaacdover@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Eisentraut @ 2009-06-08 20:53 UTC (permalink / raw)
To: pgsql-sql; +Cc: Isaac Dover <isaacdover@gmail.com>
On Saturday 06 June 2009 22:53:19 Isaac Dover wrote:
> Hello, I am attempting to build an xml representation of any database, but
> I'm having trouble doing so. I was interested in using the existing xml
> functions, such as "schema_to_xmlschema", but the results are strange and
> unusable. The resulting schema doesn't even contain the column names,
> though it doesn't include the table names. Often, the type information is
> incomplete as well.
>
> Are there any examples for using this family of functions,
> "schema_to_xmlschema", etc? My end goal is any xml representation of the
> database that includes type information.
It appears to me that there is some kind of bug in schema_to_xmlschema. As
you say, it misses a bunch of information, such as the column names of the
tables. As far as I can tell, the SQL standard actually defines it that way,
but that must be a bug.
If you use table_to_xmlschema, you will get the proper output, separately for
each table.
Note, however, that the XML mapping is not designed to be reversible.
Depending on what you want to do, this may not be the right format for you.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-06-08 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 19:53 Xml Schemas Isaac Dover <isaacdover@gmail.com>
2009-06-08 20:53 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox