From: | Tarlika Elisabeth Schmitz <postgresql3(at)numerixtechnology(dot)de> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: data import via COPY, Rules + Triggers |
Date: | 2011-05-07 09:39:44 |
Message-ID: | 20110507103944.53c2dca5@dick.coachhouse |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Wed, 4 May 2011 23:48:04 +0100
Tarlika Elisabeth Schmitz <postgresql3(at)numerixtechnology(dot)de> wrote:
>I have got a database that needs to be populated, first with historical
>data, then on a daily basis.[...]
>Once imported, data will neither be modified nor deleted.
>
>Data come in denormalized CSV formats. [...]
>I created interim tables matching the structure of the CSV formats
>I want to import via COPY and distribute the data to
>the "proper" tables via triggers.
[...]
I am the only user of the system and at the moment I have only one
database user.
I only want the insdert/update triggers to be executed when I am
importing data. There might be situations where I need to intervene
"manually" and fix some data without the triggers being actioned.
How about creating a second user through whom the imports are done?
I could query current_user in the trigger and simply skip the trigger
actions for any other user.
QUESTION:
Or could I do something more sophisticated with privileges?
--
Tarlika Elisabeth Schmitz
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2011-05-07 11:19:10 | Specifying column level collations |
Previous Message | Tarlika Elisabeth Schmitz | 2011-05-07 09:15:47 | Re: data import via COPY, Rules + Triggers |