pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: create tables using the application metadata
Date: Fri, 28 Oct 2022 08:40:36 -0500
Message-ID: <747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com> (raw)
In-Reply-To: <CALXkTpwCXLjx9=k-e6a1ktzUUUF=RtZ1OpOTzr159N=X9o2Lkw@mail.gmail.com>
References: <CALXkTpwCXLjx9=k-e6a1ktzUUUF=RtZ1OpOTzr159N=X9o2Lkw@mail.gmail.com>

On 10/28/22 02:43, Nikhil Ingale wrote:
> Hi All,
> I've metadata tables of our application where we have all tables,columns 
> and constraints information about each table stored.
>
> How do I generate the CREATE TABLE sql scripts to generate schema using 
> our application metadata table?

Depending on how your metadata tables are organized, use either the format() 
function embedded in a SELECT statement, or have your application generate 
dynamic SQL.

-- 
Angular momentum makes the world go 'round.





view thread (3+ messages)

Message-ID: <747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com>
Permalink:  ../747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com/
Also on:    postgresql.org/message-id/747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: create tables using the application metadata
  In-Reply-To: <747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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