Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 9CD4F9FB1BC for ; Fri, 3 Nov 2006 20:19:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 19981-01 for ; Fri, 3 Nov 2006 20:18:55 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31808.mail.mud.yahoo.com (web31808.mail.mud.yahoo.com [68.142.207.71]) by postgresql.org (Postfix) with SMTP id 97D3F9F9F77 for ; Fri, 3 Nov 2006 20:18:59 -0400 (AST) Received: (qmail 29180 invoked by uid 60001); 4 Nov 2006 00:18:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zIluLxSWWMUUFx/5b0xP2Qbamgp/LouZo7r+ngc9mOlsj+khOM+j8RfDaV7TOwHEYbWectxXnY1QL3rcUCyV29OtbeQ9drrDu8KFo0VW0V4Wb3XdYR5ApyhqNLDDhBPyUzWg5vB67YlsEKD2sT2SbCqBn2Edbnu4ggKwhGAtDkI= ; Message-ID: <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com> X-YMail-OSG: T9OlQIwVM1mSVu4Pf2NNr3XTsYOSaC2pTv_wrNUrys72MGRoKURN5VfDX8OuiPVmNw-- Received: from [24.54.196.198] by web31808.mail.mud.yahoo.com via HTTP; Fri, 03 Nov 2006 16:18:58 PST Date: Fri, 3 Nov 2006 16:18:58 -0800 (PST) From: Richard Broersma Jr Subject: Re: Duplicate Fields + Views Questions To: Dylan Lorimer , pgsql-sql@postgresql.org In-Reply-To: <3ddac38d0611031607w5564c44dk8e0c0a6cd5fdf0c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.864 tagged_above=0 required=5 tests=AWL, BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200611/48 X-Sequence-Number: 26700 > I've got 2 views - each with identical column names. I want to create an > aggregate view of both tables as a new view. But when I try to do this I > understandably get errors on duplicate fields. > > As an example: > > CREATE VIEW gnis_view AS SELECT * FROM gnis_international_view, > gnis_usa_view; > ERROR: column "the_geom" duplicated > ERROR: column "the_geom" duplicated > > Any ideas on how I can achieve what I am seeking Yes but you will have to specify each column name from each table and create aliases for the duplicated columns. Regards, Richard Broersma Jr.