X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 5248430F5C4 for ; Mon, 23 Jun 2003 08:29:53 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 13417-01 for ; Mon, 23 Jun 2003 05:29:42 -0300 (ADT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by svr1.postgresql.org (Postfix) with ESMTP id 1BFD930F5A7 for ; Mon, 23 Jun 2003 05:29:42 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19UMhp-0007Xl-0U; Mon, 23 Jun 2003 09:29:41 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 380B816A97; Mon, 23 Jun 2003 09:29:40 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 7AD3E16A77; Mon, 23 Jun 2003 09:29:39 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Tomasz Myrta , PGSQL-SQL Subject: Re: virtual table Date: Mon, 23 Jun 2003 09:29:23 +0100 User-Agent: KMail/1.4.3 References: <3EF61E44.2020601@klaster.net> In-Reply-To: <3EF61E44.2020601@klaster.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306230929.24372.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200306/255 X-Sequence-Number: 14013 On Sunday 22 Jun 2003 10:23 pm, Tomasz Myrta wrote: > Hi > I have another virtual problem, currently without any examples ;-) > > Let's say we have some pl/pgsql function which puts result into table1. > This flat table must be normalized and put into table2. Sometimes 1 row > from table1 =3D 1 row from table2, but sometimes 1 row from table1=3D 3 r= ows > from table2. Data from table1 are transferrend into table2 using triggers. > I found, I don't to have any data in table1. > The question is: Is it possible to create virtual table in Postgresql? > Virtual - means it won't contain any columns nor data, but trigger doing > all the job. Look into views - you'll need to provide triggers to handle the=20 update/inserts. --=20 Richard Huxton