On Wed, 18 Apr 2001, Diehl, Jeffrey wrote:
<snip>
> Querying the entire database is difficult, and very important to me.
> I tried to setup a "view of a union" scheme. That isn't supported.
> Right now I am using a perl function to rewrite my sql in such a way
> that it queries any of the tables I want and coelesces the output.
> Aggregate functions even work with this method.
</snip>
To get around this same problem, I created a base table from which all
other tables were inherited. Doing this allows for you to query on 1
table, or all data easily.
i.e.
CREATE TABLE wwwlogs (id INT4, url TEXT);
CREATE TABLE wwwlogs_041801 INHERITS (wwlogs);
CREATE TABLE wwwlogs_041701 INHERITS (wwlogs);
HTH...
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
<snip>
> Querying the entire database is difficult, and very important to me. I
> tried to setup a "view of a union" scheme. That isn't supported. Right now
> I am using a perl function to rewrite my sql in such a way that it queries
> any of the tables I want and coelesces the output. Aggregate functions even
> work with this method.
</snip>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl