help with Postgresql - users and privileges

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3805
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

help with Postgresql - users and privileges

Post by mol »

Hi!
I'm building an app, where I have a client registry in dbf file, but I need to create for everyone postgresql database.
I have to add users of application as users of postgresql.
It's simple, but my new created postgresql user has no rights to create tables in previously created db.
I granted privileges, but it still doesn't work.
I'm getting info about access denied to public schema
User avatar
serge_girard
Posts: 3342
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: help with Postgresql - users and privileges

Post by serge_girard »

Marek,

Why should end-user have rights to create tables? Do you get some SQL errors?

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3805
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: help with Postgresql - users and privileges

Post by mol »

I thought that the database will be created by master user - then I switch to notmal user and create tables
My principal wants to log every steps done by his workers, but maybe my strategy was wrong?
User avatar
serge_girard
Posts: 3342
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: help with Postgresql - users and privileges

Post by serge_girard »

Usually database and tables/indexes etc... are created by database admin. Users then will only have grants to update,insert and/or delete.
Maybe consider changing strategy.
But again, why should end-users create tables? Consider users with grant to create tables and then inserts lots of duplicates and data redundancy...
There's nothing you can do that can't be done...
franco
Posts: 889
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: help with Postgresql - users and privileges

Post by franco »

Merek,
I have a large program designed by user. At the end of very entry line there is a pick box which runs a last emloyee listbox pick.
This setidn procedure has every employee in it. This is how he can keep track of emloyee entrys and create reports.

Code: Select all

@362, 10 something
@362,60  something
 @ 362,435 BUTTON BUTTON_32C CAPTION "V" WIDTH 20 HEIGHT 20 action {{setidn('TEXT_32I')},{WIN_AC.TEXT_32I.SAVE}}   tooltip 'Click to Change Initial'   
There are some lines in the program that do not have emplyee picks.
Maybe something like this could work.
All The Best,
Franco
Canada
Post Reply