Re: Table Copy.

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: PostgreSQL Server <postgres(at)rsd(dot)it>
Subject: Re: Table Copy.
Date: 2002-09-19 22:48:16
Message-ID: 3D8A5430.9060503@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)postgresql(dot)org
>

In response to

  • Table Copy. at 2002-09-19 15:56:04 from PostgreSQL Server

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-09-19 23:40:50 Re: help w/ constructing a SELECT
Previous Message Damonte Natalia 2002-09-19 21:04:56 using rownum as index-counter of nested table or varray