Hi,
I'm trying to write a postgresql script to replicate a hierarchical
structure in a live database into my development database, where I can
debug and test more easily. I can extract the data from the live database
that needs to be inserted, but I'm having trouble writing the insertion
script
lution more along the lines of the link in my original post.
Best,
Dow
On Wed, Oct 4, 2023 at 6:26 PM Ron wrote:
> Frame challenge: why can't you just "\copy to" the dev database tables in
> the correct order, to satisfy foreign key requirements?
>
> On 10/4/23
:58 PM Ron wrote:
> Ah. We'd truncate all of the dev tables, then load a "slice" (for
> example, accounts 1 to 1, and all associated records from
> downstream tables; lots and lots of views!!) from the prod database.
>
> On 10/4/23 20:50, Dow Drake wrote:
>
&g
Yes! Thanks, Alvaro! This is exactly the pattern I was trying to work out!
This community is awesome!
> On Oct 5, 2023, at 2:39 AM, Alvaro Herrera wrote:
>
> On 2023-Oct-04, Dow Drake wrote:
>
>> I want to insert a farm record, then insert two crops associated with
Thanks Peter!
I'll take a close look at your suggestion when I get a chance. But I've
already implemented a Python script that solves my actual problem based on
the pattern that Alvaro Herrera suggested for the toy problem I described
here. It's working very well to reproduce the farm with sever