Problem with createview - Mailing list pgsql-general

From Diogo Biazus
Subject Problem with createview
Date
Msg-id 3D9DA5B6.6000209@ikono.com.br
Whole thread Raw
Responses Re: Problem with createview  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I trying to create a view with the following SQL:

select
  *
from
  ((agendasbusca
  inner join usuarios on usuarios.codusuario = agendasbusca.codusuario)
  inner join gruposusuario on gruposusuario.codgrupousuario =
usuarios.codgrupousuario)
  left join buscas on agendasbusca.codagendabusca = buscas.codagendabusca

And I'm getting this error:

ERROR:  CREATE TABLE: attribute "codagendabusca" duplicated

But I don't want to specify each field in the query, because I would
have to re-create the view on every change made on the source tables.
Is there any way to create the view in this way?

--
Diogo de Oliveira Biazus
diogo@ikono.com.br
Ikono Sistemas e Automação
http://www.ikono.com.br



pgsql-general by date:

Previous
From: Diogo Biazus
Date:
Subject: Re: Postgres for Windows
Next
From: "Ian Harding"
Date:
Subject: Re: PostgreSQL Website : advocacy.postgresql.org