Re: create tables using the application metadata

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: create tables using the application metadata
Date: 2022-10-28 13:40:36
Message-ID: 747bdd32-a2ed-2aad-9204-53b03bd8d58f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Teja Jakkidi 2022-10-28 17:52:24 Duplicate data even with primary keys enabled
Previous Message Thomas Kellerer 2022-10-28 09:33:08 Re: failed to create directory in postgresql