Re: Updating a view

From: Fernando Schapachnik <fschapachnik(at)vianetworks(dot)com(dot)ar>
To: "Ryan C(dot) Bonham" <Ryan(at)srfarms(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Updating a view
Date: 2001-08-15 16:28:11
Message-ID: 20010815132811.A5030@ns1.via-net-works.net.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-odbc

I'm not sure about Postgres in particular, but updating a view is not
always possible. Consider

CREATE VIEW TEST AS
SELECT sum(money) FROM table;

What would it mean to update an aggregate?

The propper and abstract way to do that in general is to define an
stored procedure (they would be kind of the setters of the object)
and a view (kind of the getters).

Regards.

En un mensaje anterior, Ryan C. Bonham escribió:
> Hi,
>
> Ok i know this is something stupid, somebody mind explaining it to me? Also
> sorry if this gets posted twice, i got a error back the first time..
>
> I have a Visual Basic Project that access a PostgreSQL Datbase. One Form
> pulls information from a View in postgres. If teh user changes anything on
> the form the update fails. I tried running hte dame update from PGAdmin and
> it also fails with the following message. I just dont understand what i need
> to create i guess.. Thanks for the help..

Fernando P. Schapachnik
Planificación de red y tecnología
VIA NET.WORKS ARGENTINA S.A.
fschapachnik(at)vianetworks(dot)com(dot)ar
Tel.: (54-11) 4323-3381

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tamara D. Blum 2001-08-15 16:37:26 Error installing postgresql 7.1.2
Previous Message Pete Leonard 2001-08-15 16:21:55 Re: Updating a view

Browse pgsql-odbc by date

  From Date Subject
Next Message Dwayne Miller 2001-08-15 18:50:41 Re: Re: To be 7.1.3 or not to be 7.1.3?
Previous Message Pete Leonard 2001-08-15 16:21:55 Re: Updating a view