From: | "Mikael Carneholm" <SA9625(at)ida(dot)utb(dot)hb(dot)se> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Shema functionality in 7.3 |
Date: | 2002-12-02 15:48:20 |
Message-ID: | E18IsoB-0005SI-00@mother.hb.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)carneholm(at)ida(dot)utb(dot)hb(dot)se
From | Date | Subject | |
---|---|---|---|
Next Message | Han Holl | 2002-12-02 15:54:16 | Re: Memory leak with palloc |
Previous Message | Marc G. Fournier | 2002-12-02 15:37:08 | PostgreSQL Version 7.3 Released! (repost) |