Discussion:
drop/create/alter amongst difference schemas as non-super user
Emi Lu
2014-09-03 17:24:51 UTC
Permalink
Hello,

As non-postgre user, may I know is there a way to combine
drop/create/alter amongst difference schemas please?

Something similar to:
==============
Begin;
drop schema1.v1;
\c - schema2;
drop schema2.v2;
\c - schema1;
alter table schema1.t1 alter column...;
create schema1.v1;
\c - schema2;
create schema2.v2;
commit;

This way the commit would complain and have to type pwd for diff schema
owners. Is there a better way of doing this?

Thanks a lot!
Emi
--
Note:
. Views need to be created under difference schemas and created by that
schema owner for now.
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Adrian Klaver
2014-09-03 19:17:48 UTC
Permalink
Post by Emi Lu
Hello,
As non-postgre user, may I know is there a way to combine
drop/create/alter amongst difference schemas please?
==============
Begin;
drop schema1.v1;
\c - schema2;
drop schema2.v2;
\c - schema1;
alter table schema1.t1 alter column...;
create schema1.v1;
\c - schema2;
create schema2.v2;
commit;
This way the commit would complain and have to type pwd for diff schema
owners. Is there a better way of doing this?
So schema2, schema1 are user names?

If so include the names in the .pgpass file:

http://www.postgresql.org/docs/9.3/static/libpq-pgpass.html
Post by Emi Lu
Thanks a lot!
Emi
--
. Views need to be created under difference schemas and created by that
schema owner for now.
--
Adrian Klaver
***@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...