Re: \copy, transactions and permissions

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: \copy, transactions and permissions
Date: 2008-08-13 21:32:18
Message-ID: 07F71179-5A76-47CC-A476-B0DB41C73A00@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Aug 13, 2008, at 4:25 PM, Ivan Sergio Borgonovo wrote:
> 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.

Lazier would be using JasperETL or any other ETL tool

Ries
>
>
> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-08-14 01:17:55 Re: automatic REINDEX-ing
Previous Message Ivan Sergio Borgonovo 2008-08-13 21:25:15 \copy, transactions and permissions