Search Postgresql Archives

batch insert/update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have some php code that will be pulling in a file via ftp.  This file will contain 20,000+ records that I then need to pump into the postgres db.  These records will represent a subset of the records in a certain table.  I basically need an efficient way to pump these rows into the table, replacing matching rows (based on id) already there and inserting ones that aren't.  Sort of looping through the result and inserting or updating based on the presents of the row, what is the best way to handle this?  This is something that will run nightly.


Thanks!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux