pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Dylan Lorimer <edylan@google.com>
To: pgsql-sql@postgresql.org
Subject: Re: Duplicate Fields + Views Questions
Date: Fri, 3 Nov 2006 16:18:58 -0800 (PST)
Message-ID: <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com> (raw)
In-Reply-To: <3ddac38d0611031607w5564c44dk8e0c0a6cd5fdf0c@mail.gmail.com>

> 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.



view thread (3+ messages)  latest in thread

Message-ID: <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com>
Permalink:  ../20061104001858.29178.qmail@web31808.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20061104001858.29178.qmail@web31808.mail.mud.yahoo.com

 · 

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: rabroersma@yahoo.com, edylan@google.com
  Subject: Re: Duplicate Fields + Views Questions
  In-Reply-To: <20061104001858.29178.qmail@web31808.mail.mud.yahoo.com>

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

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