Reputation
292
Top tag
Next privilege 300 Rep.
Create tags
Badges
2 4 11
Newest
 Curious
Impact
~66k people reached

  • 0 posts edited
  • 0 helpful flags
  • 1 vote cast
Mar
22
awarded  Curious
Mar
21
comment Trouble renaming a PostgreSQL database
I may delete this question because it's such a silly mistake… unless Daniel wants to post the answer and take credit for it…
Mar
21
revised Trouble renaming a PostgreSQL database
Fix error in question
Mar
21
awarded  Commentator
Mar
21
comment Trouble renaming a PostgreSQL database
I'm an idiot. thanks! missing semi-colon was the problem. Guess I just kept building my command. So, i'm guessing, the prompt -# vs =# provides a clue? Will pay attention to that moving forward…
Mar
21
asked Trouble renaming a PostgreSQL database
Dec
10
awarded  Notable Question
Dec
9
awarded  Famous Question
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?!?