Re: insert vs. copy in pgAdmin - Mailing list pgsql-novice

From Laurenz Albe
Subject Re: insert vs. copy in pgAdmin
Date
Msg-id beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at
Whole thread Raw
In response to insert vs. copy in pgAdmin  ("Schlaffer, Sharon" <Sharon.Schlaffer@nrl.navy.mil>)
List pgsql-novice
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




pgsql-novice by date:

Previous
From: psql-contact@citecs.de
Date:
Subject: Re: can't create table on new db/schema/user
Next
From: pgsql-novice@lists.postgresql.org
Date:
Subject: SOLVED: can't create table on new db/schema/user