From: | H <agents(at)meddatainc(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Creating files with testdata |
Date: | 2025-03-10 21:05:13 |
Message-ID: | D9D2EAF7-167A-4D5F-8CDB-640F7EE64AA4@meddatainc.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On March 10, 2025 3:27:02 PM GMT-04:00, Francisco Olarte <folarte(at)peoplecall(dot)com> wrote:
>On Mon, 10 Mar 2025 at 20:18, H <agents(at)meddatainc(dot)com> wrote:
>> There are tables referencing each other using randomly generated IDs,
>ie. those IDs are not known until after the parent table row is
>inserted.
>
>Random? Then they CAN collide. ;->
>
>Do the IDs need to be random or are they just the default value?
>
>I've encountered a similar problem with sequences and have bypassed it
>by using explicit values into the test data, i.e.m, inserting an
>invoice with id 1000 followed by its lines with IDs 100010, 100011,
>.... and then setting start_values for the sequences at 99999999. This
>helped me a lot in a debugging. You could do the same depending on
>what domain your random ids are on.
>
>Francisco Olarte.
K am using UUIDs which the application will use as well.
From | Date | Subject | |
---|---|---|---|
Next Message | H | 2025-03-10 21:09:46 | Re: Creating files with testdata |
Previous Message | Francisco Olarte | 2025-03-10 19:27:02 | Re: Creating files with testdata |