pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John J. Boris, Sr. <john.boris@onlinesvc.com>
To: pgsql-sql@postgreSQL.org
Subject: Does PostgreSQL have an UPDATE Function like UNIFY?
Date: Fri, 28 May 1999 20:34:33 -0400
Message-ID: <4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com> (raw)

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





view thread (5+ messages)  latest in thread

Message-ID: <4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com>
Permalink:  ../4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com/
Also on:    postgresql.org/message-id/4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: john.boris@onlinesvc.com
  Subject: Re: Does PostgreSQL have an UPDATE Function like UNIFY?
  In-Reply-To: <4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com>
  References: <4.1.19990528202544.00a652c0@bcs-main.onlinesvc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox