Creating files with testdata - Mailing list pgsql-general

From H
Subject Creating files with testdata
Date
Msg-id 84A5765B-1D3C-485B-B852-99D63D53963E@meddatainc.com
Whole thread Raw
Responses Re: Creating files with testdata
Re: Creating files with testdata
Creating files with testdata
List pgsql-general
I am developing a complex multi-tenant application in postgresql 16 in Linux. During the development I would like to be
ableto enter test data into various related tables at any given time for testing purposes. 

While this can certainly be accomplished by predefined CTE INSERT statements in an SQL file, I would prefer something
moreflexible. I am thinking of using a markdown file as a source for these CTE INSERT statements. Specifically, having
acertain structure in the markdown file where a given markdown heading level, bullet level etc. would correspond to
specifictables and columns. 

After entering my test data into the markdown file for the given test scenario, I would then run an awk script or
similarto create a SQL file with the various CTE INSERT statements. Howevever, it gets complex since I need to handle
1:Nrelationships between tables in the markdown file... 

I hope the above outline is understandable and am interested in comments and thoughts on my above approach.

Thanks.



pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: Big script execution
Next
From: Adrian Klaver
Date:
Subject: Re: Creating files with testdata