Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YsCUh-0001Xm-Ra for pgsql-sql@arkaria.postgresql.org; Tue, 12 May 2015 15:53:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YsCUh-0001A2-5r for pgsql-sql@arkaria.postgresql.org; Tue, 12 May 2015 15:53:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YsCUg-00019w-H3 for pgsql-sql@postgresql.org; Tue, 12 May 2015 15:53:18 +0000 Received: from proofpoint2.mail.rice.edu ([128.42.201.101] helo=pp2.rice.edu) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YsCUb-0006I1-Ls for pgsql-sql@postgresql.org; Tue, 12 May 2015 15:53:17 +0000 Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id t4CFopah000554; Tue, 12 May 2015 10:53:10 -0500 Received: from mh10.mail.rice.edu (mh10.mail.rice.edu [128.42.201.30]) by pp2.rice.edu with ESMTP id 1ubm6mg0sy-1; Tue, 12 May 2015 10:53:09 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh10.mail.rice.edu, auth channel X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh10.mail.rice.edu (Postfix) with ESMTP id 787A860E36; Tue, 12 May 2015 10:53:09 -0500 (CDT) Received: by aart.rice.edu (Postfix, from userid 18612) id 6E0B2100845; Tue, 12 May 2015 10:53:09 -0500 (CDT) Date: Tue, 12 May 2015 10:53:09 -0500 From: "ktm@rice.edu" To: "David G. Johnston" Cc: Jason Aleski , "pgsql-sql@postgresql.org" Subject: Re: ERROR: column "gid" specified more than once Message-ID: <20150512155309.GH31129@aart.rice.edu> References: <1431419471426-5848845.post@n5.nabble.com> <55521B89.1090900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.66533453693773e-16 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.35634480905857 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.35634480905857 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.0553703525497916 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1505120202 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On Tue, May 12, 2015 at 08:49:53AM -0700, David G. Johnston wrote: > On Tuesday, May 12, 2015, Jason Aleski wrote: > > > You probably need to specify your wildcard on both tables. > > > > CREATE TABLE "BorujerdDistCent" as > > SELECT > > "Borujerd".*, "Lorestan".*, > > t_distance(st_centroid("Lorestan".geometry),"Borujerd".geometry)/1000 > > as DistFromCntroid > > FROM "Borujerd", "Lorestan" > > > > > My bad on the assumed -bugs list from before... > > Anyway, how is this suugestion different from simply saying "*" without a > relation specification - which the OP did and it didn't work. > > David J. Because the column names are differentiated by their prefixes then: Borujerd.gid, Lorestan.gid No conflict. Regards, Ken -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql