\copy, transactions and permissions

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема \copy, transactions and permissions
Дата
Msg-id 20080813232515.102e45d8@dawn.webthatworks.it
обсуждение исходный текст
Ответы Re: \copy, transactions and permissions  (ries van Twisk <pg@rvt.dds.nl>)
Список pgsql-general
I need to write an import function with enough isolation from apache
daemon.
Code has no input other than cvs files and a signal about when to
start the import.
The sql code that will be executed will be static.
I may end up writing a mini-daemon that just start a SQL script or
just pool from cron and feed psql.

If anyone has a better (lazier, cleaner) approach it will be very
welcome.

copy from file need superuser right. I'd like to avoid it.
copy from stdin looks just as a burden on me as a programmer.
\copy seems to be what I'm looking for.

Can I use \copy inside a transaction and is it going to be rolled
back if something goes wrong?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: David Siebert
Дата:
Сообщение: Re: 8.3.1 Vs 8.3.3
Следующее
От: ries van Twisk
Дата:
Сообщение: Re: \copy, transactions and permissions