RE: Re: DB porting questions... - Mailing list pgsql-sql

From Michael Fork
Subject RE: Re: DB porting questions...
Date
Msg-id Pine.BSI.4.21.0104181743400.5220-100000@glass.toledolink.com
Whole thread Raw
In response to RE: Re: DB porting questions...  ("Diehl, Jeffrey" <jdiehl@sandia.gov>)
List pgsql-sql
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>



pgsql-sql by date:

Previous
From: Martín Marqués
Date:
Subject: groups in postgres
Next
From: Grant
Date:
Subject: Re: Timezone conversion