| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 2 months |
| seen | Apr 18 at 16:32 | |
| stats | profile views | 8 |
|
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 |
|
Aug 28 |
awarded | Popular Question |
|
Jul 26 |
comment |
PostgreSQL is running locally but I cannot connect. Why? Interesting. Are you also on Mountain Lion? Did you install PostgreSQL with Homebrew? If so, wonder if anyone else can verify this solution as opposed to changing my $PATH as I have done. |
|
Jul 26 |
comment |
PostgreSQL is running locally but I cannot connect. Why? Yes, it appears to be a $PATH problem as you stated. Things work as before when I use /usr/local/bin/psql to access the database. Either Lion didn't have a system PostgreSQL or my $PATH was set up differently. It's been a year since I last muddled with this so I can't remember exactly. As for the Unix user...with a Homebrew install of PostgreSQL the server is launched by launchd and the user is set to the local user who installed it, as a default. Things are set up differently on Mac OS X Server which starts up PostgreSQL automatically under postgres. |