267 reputation
139
bio website
location
age
visits member for 2 years, 6 months
seen Jul 10 '13 at 16:57

Mar
24
awarded  Popular Question
Sep
22
awarded  Nice Question
Sep
16
awarded  Yearling
May
9
awarded  Notable Question
May
6
awarded  Popular Question
May
5
awarded  Famous Question
Apr
18
awarded  Supporter
Mar
10
awarded  Popular Question
Dec
2
comment PostgreSQL: permission denied for relation
so, am I understanding this correctly: I could GRANT myapp TO meltemi and then probably remove meltemi's current membership in rails role. Or, I could ALTER TABLE events OWNER TO rails, etc. for each table. Then ALTER DEFAULT PRIVILEGES FOR ROLE myapp GRANT SELECT ON TABLES TO rails; so that any future migrations that Rails does will be owned by rails and not myapp?!? And as such available to meltemi who also is a member of rails (see OP). Does this make sense or am I still confounded by this seemingly perverse authorization in PostgreSQL?
Nov
30
awarded  Editor
Nov
30
revised PostgreSQL: permission denied for relation
deleted 441 characters in body
Nov
30
comment PostgreSQL: permission denied for relation
I DO understand the roles vs groups vs users separation in Postgres, at least I think I do. Sorry to use the wrong (and confusing) terminology above. But I still don't understand how to set up my database so a no-login role OWNS the database and two login roles myapp and meltemi can both have full access. One of those roles myapp will be running Rails migrations that will, inevitably?, create new tables that are, once again, owned by myapp, a login user. Should I just make meltemi a 'member' of myapp and be done with it? But that just seems kludgy...no?!?
Nov
30
comment PostgreSQL: permission denied for relation
OK, read the post you linked to; very helpful! Now, if I'm understanding things right, I think you may have meant to use myapp instead of rails above? Because myapp owns the tables (I never specified that, the migration must have). Anyway, it would sorta make sense if I renamed myapp to myapp_group and then made a new user myapp which the rails app would use to connect to DB. Make myapp and the existing meltemi, both members of the myapp_group role. But what happens when I run the next migration. won't it be owned by myapp re-creating the problem all over again?!?
Nov
30
asked PostgreSQL: permission denied for relation
Oct
23
awarded  Notable Question
Sep
12
accepted PostgreSQL is running locally but I cannot connect. Why?
Sep
12
comment PostgreSQL: Change default port used by utilites like psql, createdb, etc
That'll do, thanks!
Sep
12
accepted PostgreSQL: Change default port used by utilites like psql, createdb, etc
Sep
12
comment PostgreSQL: Change default port used by utilites like psql, createdb, etc
Mac OS X Server. in this case the users are logged into (ssh) the machine. The version of PostgreSQL that came with the server is somewhat out of date and devoted to system services. I've installed another instance for user processes and Rails apps. We only createdb when creating a new Rails application so not too often but ever couple weeks. Using psql happens more often, which prompted this inquiry. Thanks for your help!
Sep
12
asked PostgreSQL: Change default port used by utilites like psql, createdb, etc