Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1CDCE476AFF for ; Thu, 19 Sep 2002 18:58:21 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 4BA744764F1 for ; Thu, 19 Sep 2002 18:58:19 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 86015382446; Thu, 19 Sep 2002 18:57:40 -0400 (EDT) From: Dmitry Tkach X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Table Copy. Date: Thu, 19 Sep 2002 18:48:16 -0400 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 45 Message-ID: <3D8A5430.9060503@openratings.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: news@hub.org To: PostgreSQL Server User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020123 X-Accept-Language: en-us To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/229 X-Sequence-Number: 9506 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 >