Role for CSV import

Поиск
Список
Период
Сортировка
Искать
От
Tarlika Elisabeth Schmitz
Тема
Role for CSV import
Дата
в 13:08:25
Msg-id
20110515165610.503e6e81@dick.coachhouse
Список
Дерево обсуждения
Role for CSV import Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>
Re: Role for CSV import Rob Sargent <robjsargent@gmail.com>
Re: Role for CSV import Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>
Re: Role for CSV import Cédric Villemain <cedric.villemain.debian@gmail.com>
Re: Role for CSV import Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>
I have a database that will be populated solely by CSV import.
There are several CSV file formats, all denormalized.

I have created interim tables which match the CSV file formats. An
insert trigger distributes the data to their appropriate destination
tables. The destination tables themselves have insert/update triggers
for automated data clean-up. Any unresolvable inconsistencies are
reported in a log table.

I don't want the triggers to fire for every insert/update. There might
be situations where I have to perform some data clean-up manually.

So, my idea is to create a role for import, query current_user in the
trigger, perform the trigger actions for importuser and just return the
row unadulterated for adminuser.

I would give privileges to the importuser for the tables being
explicitly and implicitly populated.

Is that the best way to organize this?


=====
setup: PostgreSQL 8.4
dbname = schema name = admin name


-- 

Best Regards,
Tarlika Elisabeth Schmitz
В списке pgsql-general по дате отправления
От: David Johnston
Дата:
От: Rob Sargent
Дата:
Сообщение: Re: Role for CSV import
FAQ