Re: Updatable Cursors, CTID, and Views

Поиск
Список
Период
Сортировка
От Janet Borschowa
Тема Re: Updatable Cursors, CTID, and Views
Дата
Msg-id D486606E7AD20947BDB7E56862E04C39BDC6E7@cvo1.cvo.roguewave.com
обсуждение исходный текст
Ответ на Updatable Cursors, CTID, and Views  ("Mark Dexter" <MDEXTER@dexterchaney.com>)
Список pgsql-odbc
Hi,
I believe that Hiroshi probably used the ctid because views are not
updateable. It looks like you have to do extra work to update a view and in
that case, I'm not sure how a cursor in the driver would be implemented as
there needs to be a way to uniquely identify a row which is why Hiroshi used
the ctid column.

From the PostgreSQL docs for the SQL statement "CREATE VIEW":
Description

CREATE VIEW defines a view of a query. The view is not physically
materialized. Instead, the query is run every time the view is referenced in
a query.

...

Notes

Currently, views are read only: the system will not allow an insert, update,
or delete on a view. You can get the effect of an updatable view by creating
rules that rewrite inserts, etc. on the view into appropriate actions on
other tables. For more information see CREATE RULE.

Sorry I can't be of help but I don't know if or how you could define a view
with a ctid column and appropriate rules to enable the driver to use a
cursor on it.

========================
Janet Borschowa
Software Engineer, Database Products
Rogue Wave Software, a QUOVADX(tm) Division
(541) 753-1931   FAX: (541) 757-4630
mailto:borschow@roguewave.com <mailto:borschow@roguewave.com>
http://www.roguewave.com <http://www.roguewave.com/>

-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Wednesday, July 28, 2004 12:29 AM
To: Mark Dexter; pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Updatable Cursors, CTID, and Views





  _____

From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mark Dexter
Sent: 27 July 2004 23:26
To: pgsql-odbc@postgresql.org
Subject: [ODBC] Updatable Cursors, CTID, and Views



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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Updatable Cursors, CTID, and Views
Следующее
От: "Antonio Pennino"
Дата:
Сообщение: Re: problem with CVS version