On 12/18/13, 4:22 AM, Dimitri Fontaine wrote:
ALTER UNIT name SET SCHEMA <new schema>;
FWIW, with the "units" that we've developed we use schemas to differentiate between public objects and "internal" (private or protected) objects. So single-schema stuff becomes a PITA. Of course, since extensions already work that way I suppose that ship has sailed, but I thought I'd mention it. For those who are curious... we make the distinction of public/protected/private via schemas because we don't want general users to need to wade through that stuff when looking at objects. So the convention we settled on is that public objects go in one schema, protected objects go in a schema of the same name that's prepended with "_", and private objects are in the protjected schema but also prepend "_" to their names. IE: CREATE SCHEMA awesome_feature; CREATE VIEW awesome_feature.have_some_data CREATE SCHEMA _awesome_feature; -- Protected / private stuff CREATE VIEW _awesome_feature.stuff_for_database_code_to_see_but_not_users CREATE FUNCTION _awesome_feature._do_not_run_this_function_anywhere_outside_of_awesome_feature() -- Jim C. Nasby, Data Architect j...@nasby.net 512.569.9461 (cell) http://jim.nasby.net -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers