Received: from onlinesvc.com (lv3-196-65.dvnc.net [209.246.196.65] (may be forged)) by hub.org (8.9.3/8.9.3) with SMTP id UAA49299 for ; Fri, 28 May 1999 20:33:36 -0400 (EDT) (envelope-from john.boris@onlinesvc.com) Received: from lv3-196-68.dvnc.net ([209.246.196.68]) by onlinesvc.com (wcSMTP [445]) with SMTP id 3339301; Sat, 29 May 1999 00:44:00 GMT Message-Id: <4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com> X-Sender: john.boris@bcs-main.onlinesvc.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Fri, 28 May 1999 20:34:33 -0400 To: pgsql-sql@postgreSQL.org From: "John J. Boris, Sr." Subject: Does PostgreSQL have an UPDATE Function like UNIFY? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" I was wondering if PostgreSQL had a function that allowed you to update a table from a delimited file that would update matching records and insert new records. Under Unify you could do an update with a switch (I think it was -n) that would take input from a pipe delimited file (in the order the fields of the table) and since the table had which field was unique it would key on that and if it didn't find the key it would add the record. I have a table that has approximately 2500 records. The data for this table (and other tables in the db) comes out of a system I manage that will sometime in the future be transferred fully to this. So the data is updated (dumped from the COBOL Indexed file) and then loaded into the table (about once a week). I can delete the records and then add them but I think that might be a bit time consuming. Will I have to write a C program or Perl script to do this? I am hoping not. One can only dream. Thanks in advance. John J. Boris, Sr. Boris Computer Services/ONLine Services email:john.boris@onlinesvc.com.com bbs: The Bleeding Edge 609-858-9221