Skip site navigation (1) Skip section navigation (2)

switching between insert and update

From: "Travis Hoyt" <thoyt(at)npc(dot)net>
To: "Postgres" <pgsql-novice(at)postgresql(dot)org>
Subject: switching between insert and update
Date: 2002-03-21 13:46:49
Message-ID: DBEMKMGOMJAGKAKEPPEGKEENDFAA.thoyt@npc.net (view raw or flat)
Thread:
Lists: pgsql-novice
Not sure if this is the right list but here goes:

I've got a perl script that inserts some data.  Simple enough, but my
problem is that it fails when I try to insert more data that contains the
same time and id.  Is there an easy way of switching from an INSERT to an
UPDATE and does anyone know of any examples?  There's one more piece to
this puzzle.  The columns names and number of columns addressed are
dynamic and will change for each file loaded into the database.

Thanks,

Travis

pgsql-novice by date

Next:From: Stephan SzaboDate: 2002-03-21 16:04:32
Subject: Re: [NOVICE] Conditional constraint?
Previous:From: Nick HawDate: 2002-03-21 10:36:57
Subject: Re: [NOVICE] Conditional constraint?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group