pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Schlaffer, Sharon <Sharon.Schlaffer@nrl.navy.mil>
To: pgsql-novice@lists.postgresql.org <pgsql-novice@lists.postgresql.org>
Subject: Re: insert vs. copy in pgAdmin
Date: Fri, 28 Aug 2020 13:32:08 +0200
Message-ID: <beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at> (raw)
In-Reply-To: <9801F54B-E5E6-4C0B-BDC6-0FA24BA3558E@nrl.navy.mil>
References: <9801F54B-E5E6-4C0B-BDC6-0FA24BA3558E@nrl.navy.mil>

On Thu, 2020-08-27 at 15:59 +0000, Schlaffer, Sharon wrote:
> When I use the import (csv) into a table feature, it makes a copy. This is not working for our
>  database folks (they need to auto-populate a date/time field and for whatever reason,
>  cannot do this if I “copy” the csv into the db).

Try to get a detailed technical description of your DBAs' problems.

> Is there a way to import and stipulate “insert” instead (using pgAdmin, that is).

I don't think so.

But you can COPY to a temporary table and then use

  INSERT INTO ... SELECT ...

to populate the target table from the temporary table.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (3+ messages)

Message-ID: <beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at>
Permalink:  ../beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at/
Also on:    postgresql.org/message-id/beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, Sharon.Schlaffer@nrl.navy.mil, pgsql-novice@lists.postgresql.org
  Subject: Re: insert vs. copy in pgAdmin
  In-Reply-To: <beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at>

* 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