Erwin Pombett
asked on
looking for an example of how to create users out of a table in the database.
i need to create users in postgres databases.
i integrate datas from excel files with c# in a new created database,
i need now to get users out of a table and give them rights depending what was entry in the table.
three kind of users....
what 's the best way to do this? do I need to generate a file and then pass to postgres?
with procedures?
i need an advice on how to do it and a description on steps to do.
some code is wellcome or link on code solution.
i integrate datas from excel files with c# in a new created database,
i need now to get users out of a table and give them rights depending what was entry in the table.
three kind of users....
what 's the best way to do this? do I need to generate a file and then pass to postgres?
with procedures?
i need an advice on how to do it and a description on steps to do.
some code is wellcome or link on code solution.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
hi adrpo,
the first part is done,
i have install xp with pgadminIII which install also the 8.2 postgres server.
i could create user, databases, i create a c# class to connect to postgres,
everything is working.
i' have an xls file with a list of people that will connect read only to database. some of them will have permissions to make changes, a columns in excel file has the type of the user.
as far as i understand now, i have to generate a csv file while parsing my excel file with c#. the csv file will have loginuser and right type.
then i parse that file from postgresql with the call(execute) in order to
create the users and roles for the database.
what would be good practice for doing this, how to use roles and grouproles?
i need : "communityUser" "logisticUser" and "communityAdmin".
should i create three grouproles with the rights, and then create roles and add them to grouproles?
the first part is done,
i have install xp with pgadminIII which install also the 8.2 postgres server.
i could create user, databases, i create a c# class to connect to postgres,
everything is working.
i' have an xls file with a list of people that will connect read only to database. some of them will have permissions to make changes, a columns in excel file has the type of the user.
as far as i understand now, i have to generate a csv file while parsing my excel file with c#. the csv file will have loginuser and right type.
then i parse that file from postgresql with the call(execute) in order to
create the users and roles for the database.
what would be good practice for doing this, how to use roles and grouproles?
i need : "communityUser" "logisticUser" and "communityAdmin".
should i create three grouproles with the rights, and then create roles and add them to grouproles?
ASKER
in order to parse it with postgres functions.
what i dont understand is where to start with my prob.
where do i write your commands - COPY tablename[] ....- to start with? i'll arrange them once i know where to introduce them.
and how do i launch it then ?
i dont need you to do my job earhman, as you're the biggest expert here i don't want to loose your time
,you can give so many answers to people.
if you know a good tutorial on how to do it, or an article i'll suit me.
i'll be able to ask more precisely then.
thanks in advance, you over guru ;o)