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 ADEE030F601 for ; Mon, 23 Jun 2003 11:02:17 +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 36961-03 for ; Mon, 23 Jun 2003 08:02:07 -0300 (ADT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id D190B30F5FC for ; Mon, 23 Jun 2003 08:02:06 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19UP5K-0006m5-0Z; Mon, 23 Jun 2003 12:02:06 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id A1A1A17015; Mon, 23 Jun 2003 12:02:04 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 2434416CA6; Mon, 23 Jun 2003 12:02:04 +0100 (BST) Content-Type: text/plain; charset="iso-8859-2" From: Richard Huxton Organization: Archonet Ltd To: Tomasz Myrta Subject: Re: virtual table Date: Mon, 23 Jun 2003 12:01:49 +0100 User-Agent: KMail/1.4.3 Cc: PGSQL-SQL References: <3EF61E44.2020601@klaster.net> <200306230954.54185.dev@archonet.com> <3EF6C3D6.7080904@klaster.net> In-Reply-To: <3EF6C3D6.7080904@klaster.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306231201.49969.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200306/260 X-Sequence-Number: 14018 On Monday 23 Jun 2003 10:09 am, Tomasz Myrta wrote: > Dnia 2003-06-23 10:54, U=BFytkownik Richard Huxton napisa=B3: > > Hmm - I think your problem is going to come before that. Any time you do > > an INSERT, PostgreSQL is going to need to know the types of all the > > columns involved. > > > > For this sort of thing, I try to keep all the related bits (initial > > function, views, triggers) in the same text-file to encourage me to > > remember to update them all together. > > I also do this - it isn't really difficult with well written scripts. I w= as > just wondering if I don't waste my time tracking all the changes. I know what you mean - except for simple cases I've never managed to automa= te=20 type-checking my code without running it through PG. > > It sounds like this table1 is only being used during transfer. Is there > > any reason why you aren't just inserting the required rows into table2. > > My queries are ordinary transportation problems with 0 up to 2 changes. I > found it's better (for performance reason) to find all possible relations > as single rows and split them at the end into simple connections. Maybe I > should dig into this problem again and rewrite my queries... Not saying you've got the wrong approach. Might be worth a few minutes=20 attention though --=20 Richard Huxton