Try this:
1. Open psql console as user postgres.
2. Execute
SELECT ('\\c ' || datname || '\nALTER TABLE the_table_name OWNER TO ' ||
rolname || ';\n') from pg_database join pg_authid on datdba = pg_authid.oid;
3. Check results.
4. Select results with mouse.
5. Paste it to postgres console (Middle
Try this:
1. Open psql console as user postgres.
2. Execute
SELECT ('\\c ' || datname || '\nALTER TABLE the_table_name OWNER TO '
||
rolname || ';\n') from pg_database join pg_authid on datdba =
pg_authid.oid;
3. Check results.
4. Select results with mouse.
5. Paste it to postgres console (Midd
On Tuesday 14 December 2010 5:58:16 pm Paul McGarry wrote:
> On Wed, Dec 15, 2010 at 12:39 PM, Adrian Klaver
wrote:
> > You did not say what version you are using. In 9.0 you have this option:
> > http://www.postgresql.org/docs/9.0/interactive/sql-alterdefaultprivileges
> >.html
>
> Our servers a
On Wed, Dec 15, 2010 at 12:39 PM, Adrian Klaver wrote:
> You did not say what version you are using. In 9.0 you have this option:
> http://www.postgresql.org/docs/9.0/interactive/sql-alterdefaultprivileges.html
Our servers are a mix of 8.3 and 8.4.
> I generally do as superuser;
>
> SET ROLE us
On Tuesday 14 December 2010 5:02:56 pm Paul McGarry wrote:
> I have a number of DBs that are all the same structure but are owned
> by different users and I want to add a table to each of those DBs.
>
> At the moment I have to either connect to each DB as it's user (which
> means digging up it's pa