Ambiguous error on view

Поиск
Список
Период
Сортировка
От Toff
Тема Ambiguous error on view
Дата
Msg-id XfwXe.197826$L_7.10628197@phobos.telenet-ops.be
обсуждение исходный текст
Список pgsql-novice
Hello!

I want to create a view of a table that is in several schema's.

The table is
CREATE TABLE "operator"
(
 "operatorid"  INTEGER   PRIMARY KEY,
 "accountid"  INTEGER   REFERENCES "account"("accountid"),
 "name"   VARCHAR (40),
 "active"  BOOLEAN,
);

The schema's are "acc1", "acc2", ......

The view........
CREATE VIEW allops AS
    SELECT operatorid, accountid, name
        FROM acc1.operator, acc2.operator
        WHERE active = true;

But I get the "ERROR:  column reference "operatorid" is ambiguous"
If I remove "operatorid", or "accountid" in the view, the errortype is the
same.

What is the ambiguous thing about this? And how to solve it?
On the internet I found some posts with the same issue, but no direct
answers.

Thanks,

Kristoff



В списке pgsql-novice по дате отправления:

Предыдущее
От: "Peter Cook"
Дата:
Сообщение: Application access to postgreSQL
Следующее
От: Gnanavel S
Дата:
Сообщение: Re: Ambiguous error on view