Re: CURRENT OF cursor without OIDs

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: CURRENT OF cursor without OIDs
Дата
Msg-id 3B7091BC.5CFB58BC@tpf.co.jp
обсуждение исходный текст
Ответ на CURRENT OF cursor without OIDs  (Ian Lance Taylor <ian@airs.com>)
Список pgsql-hackers
Ian Lance Taylor wrote:
> 

[snip]

> > > >
> > > > Yes TID is available and I introduced Tid Scan in order
> > > > to support this kind of implementation. However there
> > > > are some notices.
> > > > 1) Is *FOR UPDATE* cursor allowed in PL/pgSQL ?
> > > >    (It doesn't seem easy for me).
> > >
> > > No, it is not supported right now.
> > >
> > > Conceptually, however, PL/pgSQL could pull out the FOR UPDATE clause
> > > and turn it into an explicit LOCK statement.
> >
> > It's impossible to realize *FOR UPDATE* using LOCK statement.
> > Each row must be locked individually to prevent UPDATE/DELETE
> > operations for the row. You could acquire an EXCLUSIVE
> > LOCK on the table but it doesn't seem preferable.
> 
> It's definitely not preferable, but how else can it be done?
> 
> > I'm planning to implement updatable cursors with no lock
> > using TID and OID. TID is for the fast access and OID is
> > to verify the identity. OID doesn't provide a specific
> > access method in the first place and the access would be
> > veeery slow for large tables unless there's an index on OID.
> 
> I apologize if I've missed something, but how will that work when OIDs
> become optional?
> 

So I've objected optional OIDs.

regards,
Hiroshi Inoue


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

Предыдущее
От: Ian Lance Taylor
Дата:
Сообщение: Re: CURRENT OF cursor without OIDs
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: OID wraparound: summary and proposal