Re: data import via COPY, Rules + Triggers
От | Tarlika Elisabeth Schmitz |
---|---|
Тема | Re: data import via COPY, Rules + Triggers |
Дата | |
Msg-id | 20110507103944.53c2dca5@dick.coachhouse обсуждение исходный текст |
Ответ на | data import via COPY, Rules + Triggers (Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>) |
Список | pgsql-sql |
On Wed, 4 May 2011 23:48:04 +0100 Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.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
В списке pgsql-sql по дате отправления: