From: Dmitry Tkach <dmitry@openratings.com>
To: PostgreSQL Server <postgres@rsd.it>
Subject: Re: Table Copy.
Date: Thu, 19 Sep 2002 18:48:16 -0400
Message-ID: <3D8A5430.9060503@openratings.com> (raw)
References: <Pine.LNX.4.44.0209191747250.31615-100000@sunrise2.radiostudiodelta.it>
what about
CREATE TABLE one (
fileda INTEGER,
filedb INTEGER,
filedc INTEGER );
CREATE VIEW two AS SELECT * FROM one;
?
Dima
PostgreSQL Server wrote:
> HI!
>
> I'm new to postgres. I need to have a table as a copy of another one.
>
> Example:
>
> CREATE TABLE one (
> fileda INTEGER,
> filedb INTEGER,
> filedc INTEGER );
>
> CREATE TABLE two (
> fileda INTEGER,
> filedb INTEGER,
> filedc INTEGER );
>
> As on insert to table one I should get the same insert on table two.
> As on delete to table one I should get the same delete on table two.
> As on update to table one I should get the same update on table two.
>
> Can someone provide the examples i can study ?
>
> Thanks in advance.
>
> Alex
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dmitry@openratings.com, postgres@rsd.it
Subject: Re: Table Copy.
In-Reply-To: <3D8A5430.9060503@openratings.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox