public inbox for [email protected]  
help / color / mirror / Atom feed
From: Francisco Olarte <[email protected]>
To: H <[email protected]>
Cc: [email protected]
Subject: Re: Creating files with testdata
Date: Mon, 10 Mar 2025 20:27:02 +0100
Message-ID: <CA+bJJbzgiri9pU2=dzB-Ru24bYHA=xBn-TPr1sjg=sDqtixYYQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>

On Mon, 10 Mar 2025 at 20:18, H <[email protected]> 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.






view thread (6+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Creating files with testdata
  In-Reply-To: <CA+bJJbzgiri9pU2=dzB-Ru24bYHA=xBn-TPr1sjg=sDqtixYYQ@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox