Re: keeping 3 tables in sync w/ each other - Mailing list pgsql-general

From Ow Mun Heng
Subject Re: keeping 3 tables in sync w/ each other
Date
Msg-id 1190195232.15764.26.camel@neuromancer.home.net
Whole thread Raw
In response to Re: keeping 3 tables in sync w/ each other  (btober@ct.metrocast.net)
List pgsql-general
On Tue, 2007-09-18 at 08:37 -0400, btober@ct.metrocast.net wrote:
> Ow Mun Heng wrote:
> > Hi,
> >
> > create table foo (a int, b int, c int)
> > create table foo_loading_source1 (a int, b int, c int)
> > create table foo_loading_source2 (a int, b int, c int)
> >
> > Is there a way which can be made easier to keep these 3 tables DDL in
> > sync?

> Since these are temporary tables, why don't you just create them on the
> fly as temporary tables?
>
> CREATE TEMPORARY TABLE foo_loading_source1 (LIKE foo);
>
> CREATE TEMPORARY TABLE foo_loading_source2 (LIKE foo);
>
> Then do your loading process. Then you don't really have to worry about
> maintaining the loading tables at all.
>

Yes, I've thought of this, but wouldn't this cause additional overhead
as the loading process may be initiated between every 60sec to 30mins
for a handful of tables each time. (which was why I asked the list)




pgsql-general by date:

Previous
From: Ow Mun Heng
Date:
Subject: Re: keeping 3 tables in sync w/ each other
Next
From: "Filip Rembiałkowski"
Date:
Subject: Re: keeping 3 tables in sync w/ each other