Re: Shema functionality in 7.3
От | Mikael Carneholm |
---|---|
Тема | Re: Shema functionality in 7.3 |
Дата | |
Msg-id | E18IsoB-0005SI-00@mother.hb.se обсуждение исходный текст |
Ответ на | Shema functionality in 7.3 ("Mikael Carneholm" <SA9625@ida.utb.hb.se>) |
Список | pgsql-general |
> Like this? > > CREATE SCHEMA schema1; > CREATE SCHEMA schema2; > CREATE TABLE schema1.table_a(bar int, foo text); > INSERT INTO schema1.table_a VALUES(1,'a'); > INSERT INTO schema1.table_a VALUES(2,'b'); > CREATE TABLE schema2.table_b(bar int, foo text); > INSERT INTO schema2.table_b VALUES(1,'c'); > INSERT INTO schema2.table_b VALUES(2,'d'); > > regression=# SELECT t1.foo, t2.foo FROM schema1.table_a t1, > schema2.table_b t2 WHERE t1.bar = t2.bar; > foo | foo > -----+----- > a | c > b | d > (2 rows) SUPER! (Thanks to both Joe and Jochem who took the time to answer) Now, with both schema and prepared queries (stored procedures) support there is NOTHING LEFT of the Oracle functionality I used to miss in 7.2 (except perhaps tablespaces). Shema support is essential for logical grouping of tables and mapping to applications which, in extension, enhances reusability a great deal! (userB who owns schemaB and represents application B can now re-use schemaA.table1 without having to connect as userA & do the joining on the client side, provided of course that userB has been granted read rights on schemaA.table1) When I was working with Oracle, we had a 1:1 mapping between schema<->user/owner<- >application - this can now be reproduced in Pg as well! Kudos to the dev team, you have done a tremendous job! - Mikael --------------------------------------------------------- Mikael Carneholm, M.Sc. The University College of Boras, Sweden Email: mikael.carneholm@ida.utb.hb.se
В списке pgsql-general по дате отправления: