Re: Generating an XSD file from an existing database

From: Blake McBride <blake1024(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Generating an XSD file from an existing database
Date: 2015-12-06 21:59:25
Message-ID: CABwHSOvNwAXzZmarcuQUB20ztx=dvxTL05_z-Bf_27JraPiU8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 6, 2015 at 3:47 PM, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:

>
> > On Dec 6, 2015, at 2:30 PM, Blake McBride <blake1024(at)gmail(dot)com> wrote:
> >
> > Greetings,
> >
> > I need an XML specification for my exiting schema - an XSD file.
> Reading the docs I see schema_to_xml but I do not understand:
> >
> > A. Will that produce the XSD file I seek?
> >
> > B. I do not understand the documentation. Can I do this through psql?
> I need an exact example if possible.
> >
> > Thank you.
> >
> > Blake McBride
> >
> Yes, those functions are available through psql
> select schema_to_xml(<arglist>)
> and
> select schema_to_xmlschema(<arglist>) are what you’re after.
>
> Redirect the output of each into separate files.
>

Thanks. My problem is understanding the arguments. I am hoping to get an
exact example.

Server: localhost
Database: wmco
Schema: public

Once I am in psql, exactly what do I type? (I just don't understand the
docs.)

Thank you!

Blake

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-12-06 22:46:18 Re: Generating an XSD file from an existing database
Previous Message Rob Sargent 2015-12-06 21:47:26 Re: Generating an XSD file from an existing database