Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trkNr-008twF-Vs for pgsql-general@arkaria.postgresql.org; Mon, 10 Mar 2025 21:09:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1trkNq-000LEH-Lz for pgsql-general@arkaria.postgresql.org; Mon, 10 Mar 2025 21:09:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trkNq-000LD7-AD for pgsql-general@lists.postgresql.org; Mon, 10 Mar 2025 21:09:58 +0000 Received: from mout.perfora.net ([74.208.4.196]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1trkNm-0026sn-2Y for pgsql-general@lists.postgresql.org; Mon, 10 Mar 2025 21:09:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meddatainc.com; s=s1-ionos; t=1741640994; x=1742245794; i=agents@meddatainc.com; bh=yBER5MNQVSM29wSZWxBP2Ek98GxMl67ssdGo3PgPvu4=; h=X-UI-Sender-Class:Date:In-Reply-To:References:MIME-Version: Content-Type:Content-Transfer-Encoding:Subject:To:From:Message-ID: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=UHELEpIpuL/aV7Ju8hPrz1gEBnRb9WWCDmIA39IO5DQpLQpBbrrmMZJto3rAMUCF FHbKNd5j/M8sNP1MadFjymvvXj4b7/wiIuGHoTMcnP2gPDUfWg7eo5/lL0XApPT+G uVkGs643lR74FWVy1gGToP3l+k1YaIHY1vsAqsOb6tNJHjhivGlXB+2u2oH/J7ogO 4N/IRIcSIFlqr1w4fV8vRkaftNvMBF+b59XuV4CeEYv4MjjXkTiFPpKv9QRBBskAW vOeZFvBSaDfdWp9DFCibYf0JHjhHjqBrvaLsFrgp0POaQtJA9v+s2zVASpIyVpaQI UWtvyikFYhK6tEtAXA== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from [192.168.106.147] ([96.245.190.98]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1MUXAC-1tiuh82XvU-00XbDS for ; Mon, 10 Mar 2025 22:09:54 +0100 Date: Mon, 10 Mar 2025 17:09:46 -0400 User-Agent: K-9 Mail for Android In-Reply-To: References: <84A5765B-1D3C-485B-B852-99D63D53963E@meddatainc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Creating files with testdata To: pgsql-general@lists.postgresql.org From: H Message-ID: <1CB9D882-99B8-4E26-8683-E5A4A0F735C6@meddatainc.com> X-Provags-ID: V03:K1:qO9SMzB3Hf9OtfitFzyLBcp3kSOsPsywTMMtS4ogfzChs8DA/+I u6KzFBQTxPpJ6FkEQbsDhpYv5aqhDzfwxxwNaCJEtuedqCMPLbNyHhc0LSwEzOoWJDNHZZ9 3iP+q5bjClBs3poKXN1NJsI+umCgkw3HkRDDufwL9XDBh1R493FYYIcOh2kQlq3L/11LiMz 97M83AVRrjTa3PP3vPdbQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:54YxdM1uIYg=;UPyTdseok2Q285Q/NBQeJeGSQzz bDbzmw6maIqjadMiqmr6vOrOkJEnoGNpYuyWlg5sP0cqRuZF49N+8zlZNZ4X7pOGWbjYOJtIn 6pqaVMCs9McMH+CEr8NH6c6+wy+pjsSqg6H4lfH01OKW8eQ/0an+v1ukh0k1hBwyeeG8ypq6a BZnzMu/a3gUT92u3IejjKC3o4VC7Lt+HvXfcv6Z80WEpLaud9ZbA9s5UIr3eCWF8ILr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UZ5LQFNhLEj8r3+7JgbBNoJHfY/njKrP0l7m VaHT/R2L40Yoz4AyBelj0qyZ8/3u9OyLv7RVh6A1TVl4CUI2rVYXHCGYimtTUtUoykGSsIaI9 sjCMTM+oVVGdnW/g== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On March 10, 2025 3:22:41 PM GMT-04:00, Francisco Olarte wrote: >On Mon, 10 Mar 2025 at 19:17, H wrote: >=2E=2E=2E >> After entering my test data into the markdown file for the given test >scenario, I would then run an awk script or similar to create a SQL >file with the various CTE INSERT statements=2E Howevever, it gets complex >since I need to handle 1:N relationships between tables in the markdown >file=2E=2E=2E >> I hope the above outline is understandable and am interested in >comments and thoughts on my above approach=2E > >I do not think MD would be a good source format=2E Being a developer I >would recommend taking your favorite scripting language ( perl / >python / lua / js , whatever ), build a big object ( which can be >easily helped by some mini-functions to build a little DSL ) and then >spit sql from it ( for developemewnt it is normally better then using >whatever db connection your language has, as it leaves an >understandable sql script )=2E > >I have done this with perl for some projects, built a driver which >defined several helper functions, then dofile("xx=2Edat") which returned >a big hash and then a series of loops on the result to write the SQL >in whatever order was neccessary=2E > >Francisco Olarte=2E The plan is to use the same format for later adding information into the f= inished application=2E By the way, all information is text, either paragrap= hs, sentences or single words=2E