Re: keeping 3 tables in sync w/ each other

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: btober(at)ct(dot)metrocast(dot)net
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: keeping 3 tables in sync w/ each other
Date: 2007-09-19 09:47:12
Message-ID: 1190195232.15764.26.camel@neuromancer.home.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2007-09-18 at 08:37 -0400, btober(at)ct(dot)metrocast(dot)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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Filip Rembiałkowski 2007-09-19 10:05:06 Re: keeping 3 tables in sync w/ each other
Previous Message Ow Mun Heng 2007-09-19 09:45:04 Re: keeping 3 tables in sync w/ each other