how to update a view from a table

From: Vijay Sharma <vjsharma25(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: how to update a view from a table
Date: 2010-01-28 23:08:23
Message-ID: 1400bc821001281508v5b2e460dm7f259095f4c43b2c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can i update all the fields of a view from a table(this is table
different from the table which has created the view)?
I don't want to specify the name of the columns in the commands
e.g i want to do something like this

UPDATE any_view SET (SELECT * FROM any_view) = (SELECT * FROM
another_table);

but this query doesn't work.

Whats the way around without specifying the colum name in the SET. In that
sense i want to make this query a general query which can update any view
from any other table.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pierre Chevalier 2010-01-28 23:38:23 Re: dynamic crosstab
Previous Message Jeff Davis 2010-01-28 23:01:27 Re: Amazon EC2 CPU Utilization