Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager

by 1nickt (Abbot)
on May 08, 2020 at 16:33 UTC ( #11116583=note: print w/replies, xml ) Need Help??


in reply to Re^4: 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,

Add to your DB schema:

unique key all_cols_uk (every, column, name, in, the, table),

https://www.w3schools.com/sql/sql_unique.asp

Hope this helps!


The way forward always starts with a minimal test.
  • Comment on Re^5: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
  • Download Code

Replies are listed 'Best First'.
Re^6: Create parallel database handles or SQL statements for multi-threaded/process access to Postgres DB using DBI, DBD::Pg and Parallel::ForkManager
by erix (Parson) on May 08, 2020 at 18:52 UTC

    On that page postgres is not mentioned; in postgresql-SQL, that'd become, I think:

    create unique index all_cols_uk on tablename (every, column, name, in, + the, table) ;

    See: CREATE INDEX in the fine manual

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11116583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2020-10-26 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (252 votes). Check out past polls.

    Notices?