Re: Importing into Postgres from a csv file

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: Importing into Postgres from a csv file
Дата
Msg-id 200008241903.PAA16119@corvette.mascari.com
обсуждение исходный текст
Ответ на Importing into Postgres from a csv file  ("Jake" <ccrasoro@home.com>)
Список pgsql-general
> On Thu, 24 Aug 2000, Roderick A. Anderson wrote:
>
> > On Thu, 24 Aug 2000, John McKown wrote:
> >
> > > I think that you can do this using the COPY verb in psql.
> > >
> > > COPY table FROM file USING DELIMITERS ',';
> >
> > Be aware you will probably have to start psql as the postgres
(superuser)
> > to use the COPY command.
> >
> > But ... the \copy version is usable by normal users.
>
> Why do you need to be the postgres superuser to do this this? I admin
that
> I have only used the COPY table FROM STDIN; version of the command. It
> works under my "normal" id.
>

I believe this was for security reasons. When the backend performs a COPY,
as opposed to the client, it executes the command as the Unix user
"postgres".
Therefore, if Joe User could have the backend perform the COPY, he could
overwrite contents of the $PGDATA tree at will (or any other files which
should
only be modified by the server itself).

Hope that helps,

Mike Mascari


В списке pgsql-general по дате отправления:

Предыдущее
От: "Jackson Ching"
Дата:
Сообщение: Still No Suitable Driver
Следующее
От: Michael Widenius
Дата:
Сообщение: Re: Great Bridge re-runs benchmark with MySQL "tuned"