Re: insert vs. copy in pgAdmin

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: insert vs. copy in pgAdmin
Дата
Msg-id beb50dc09b5bd1066863834f73639079f0044610.camel@cybertec.at
обсуждение исходный текст
Ответ на insert vs. copy in pgAdmin  ("Schlaffer, Sharon" <Sharon.Schlaffer@nrl.navy.mil>)
Список 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 по дате отправления:

Предыдущее
От: psql-contact@citecs.de
Дата:
Сообщение: Re: can't create table on new db/schema/user
Следующее
От: pgsql-novice@lists.postgresql.org
Дата:
Сообщение: SOLVED: can't create table on new db/schema/user