agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Jason Aleski <jason.aleski@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: ERROR: column "gid" specified more than once
Date: Tue, 12 May 2015 10:53:09 -0500
Message-ID: <20150512155309.GH31129@aart.rice.edu> (raw)
In-Reply-To: <CAKFQuwaqLKUkr7Hcp219kVcMb7YmsBjK9qu6tsU7MHC-QyUScg@mail.gmail.com>
References: <1431419471426-5848845.post@n5.nabble.com>
	<55521B89.1090900@gmail.com>
	<CAKFQuwaqLKUkr7Hcp219kVcMb7YmsBjK9qu6tsU7MHC-QyUScg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On Tue, May 12, 2015 at 08:49:53AM -0700, David G. Johnston wrote:
> On Tuesday, May 12, 2015, Jason Aleski <jason.aleski@gmail.com> 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



view thread (8+ messages)  latest in thread

Message-ID: <20150512155309.GH31129@aart.rice.edu>
Permalink:  ../20150512155309.GH31129@aart.rice.edu/
Also on:    postgresql.org/message-id/20150512155309.GH31129@aart.rice.edu

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ktm@rice.edu, david.g.johnston@gmail.com, jason.aleski@gmail.com
  Subject: Re: ERROR: column "gid" specified more than once
  In-Reply-To: <20150512155309.GH31129@aart.rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox