From: | Adrian Klaver <aklaver(at)comcast(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | John <jfabiani(at)yolo(dot)com> |
Subject: | Re: using the schema in postbooks |
Date: | 2009-08-07 13:52:26 |
Message-ID: | 200908070652.27061.aklaver@comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Friday 07 August 2009 6:42:07 am John wrote:
> Hi,
> There is an accounting system called postbooks that uses Postgres for the
> backend. I just downloaded the program yesterday. What is interesting is
> within one database there are two schemas (api and public). The 'api'
> schema is a bunch of views. The interesting part is if you update a view
> in the 'api' it updates a table in the 'public' schema. Could someone
> explain how that works? I was not aware that within a databases that the
> schema's could talk to each other.
>
> I looked in the doc's (that I have) but did not find an entry that
> describes doing anything similar.
>
> Johnf
From:
http://www.postgresql.org/docs/8.4/interactive/sql-createschema.html
"A schema is essentially a namespace: it contains named objects (tables, data
types, functions, and operators) whose names can duplicate those of other
objects existing in other schemas. Named objects are accessed either
by "qualifying" their names with the schema name as a prefix, or by setting a
search path that includes the desired schema(s). A CREATE command specifying an
unqualified object name creates the object in the current schema (the one at
the front of the search path, which can be determined with the function
current_schema). "
--
Adrian Klaver
aklaver(at)comcast(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2009-08-07 13:55:20 | Re: batch inserts in python & libpq |
Previous Message | John | 2009-08-07 13:42:07 | using the schema in postbooks |