in reply to Re^2: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
in thread Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
Hi again, maybe what you need is an no-op "upsert", implemented in Postgres with INSERT ON CONFLICT ?
Something like
... where foo is your column that has a unique key constraint.INSERT INTO myTable (foo, bar) VALUES ('baz', 'qux') ON CONFLICT (foo) DO NOTHING;
Hope this helps!
The way forward always starts with a minimal test.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
by perlygapes (Sexton) on Apr 30, 2020 at 13:53 UTC | |
Re^4: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
by perlygapes (Sexton) on May 08, 2020 at 05:53 UTC | |
by 1nickt (Canon) on May 08, 2020 at 16:33 UTC | |
by erix (Prior) on May 08, 2020 at 18:52 UTC |
In Section
Seekers of Perl Wisdom