October 18th, 2002, 04:48 AM
same table name by another user in same database ???
I have a database called 'dev' with users u_test, u_hris.
If user u_test creates a table d_hris_per_1, user u_hris cannot create a table with the same name! It gives the error...
ERROR: Relation 'd_hris_per_1' already exists
Anyone can query, but DML is possible by owner only.
Is this functionality ? Why can't another user create any table in his space ??
So, now it is possible to restrict users access to a database ?? For eg.,
- user 'u_test' should access 'test' database only in pg_hba.conf
- user 'u_hris' should access 'hris' database only
Thanks for your valuable input.
October 18th, 2002, 10:05 AM
Are you coming from the Oracle world?
The behavior you are seeing isn't a bug, it's normal. Users share one global tablespace, each user does not have their own schema, as they do in Oracle.
This feature will most likely be included in the upcoming 7.3 release.
So for now your users will need to create unique table names.
One workaround is just to have them preface the table names with their usernames, like,
October 18th, 2002, 11:43 PM
BTW, nice to know that schemas will be introduced in the next release.