From: Igor <kryltsov@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Re: CREATE VIEW ERROR
Date: Thu, 23 Jan 2003 16:00:45 +1100
Message-ID: <b0nstr$1ehk$1@news.hub.org> (raw)
References: <d418ccf3.0301181703.57244c80@posting.google.com>
I found answer.
Thank you for everyone who did not reply.
CREATE VIEW depend_view AS
SELECT depend.subfunction_id, a.subfunction_file AS x,
depend.subfunction_dep_id, b.subfunction_file AS y
FROM depend INNER JOIN subfunction a ON depend.subfunction_id =
a.subfunction_id INNER JOIN subfunction b ON depend.subfunction_dep_id =
b.subfunction_id;
"Igor" <kryltsov@yahoo.com> wrote in message
news:d418ccf3.0301181703.57244c80@posting.google.com...
> Hi,
>
> I have following SQL statement which does not report any errors:
>
> test=# SELECT a.subfunction_file, b.subfunction_file
> test-# FROM depend INNER JOIN subfunction a ON depend.subfunction_id =
> a.subfunction_id
> test-# INNER JOIN subfunction b ON depend.subfunction_dep_id =
> b.subfunction_id;
> subfunction_file | subfunction_file
> ----------------------------+----------------------------
> show_batch_2.php | search_receipt.php
> ...........
>
> But when I try to create VIEW a have following error:
>
> test=# create view depend_view as SELECT a.subfunction_file,
> b.subfunction_file
> test-# FROM depend INNER JOIN subfunction a ON depend.subfunction_id =
> a.subfunction_id
> test-# INNER JOIN subfunction b ON depend.subfunction_dep_id =
> b.subfunction_id;
>
> ERROR: CREATE TABLE: attribute "subfunction_file" duplicated
> <<<--------!!!!
>
>
> Please advise where is my mistake. I use:
>
> test=# select version();
> version
> ---------------------------------------------------------------------
> PostgreSQL 7.2.1 on i386-unknown-freebsd4.3, compiled by GCC 2.95.3
> (1 row)
>
>
> Thank you,
>
> Igor
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: kryltsov@yahoo.com
Subject: Re: CREATE VIEW ERROR
In-Reply-To: <b0nstr$1ehk$1@news.hub.org>
* 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