Re: [HACKERS] Re: [QUESTIONS] Business cases

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Re: [HACKERS] Re: [QUESTIONS] Business cases
Дата
Msg-id Pine.NEB.3.95.980121133649.14635k-100000@hub.org
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [QUESTIONS] Business cases  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
On Wed, 21 Jan 1998, Bruce Momjian wrote:

>  >
> >
> > Moved to pgsql-hackers@postgresql.org, where it should have been moved
> > *ages* ago
> >
> > Connected to:
> > Oracle7 Server Release 7.3.3.0.0 - Production Release
> > With the distributed, replication and parallel query options
> > PL/SQL Release 2.3.3.0.0 - Production
> >
> > SQL> create table one ( a integer primary key not null );
> >
> > Table created.
> >
> > SQL> insert into one values (2);
> >
> > 1 row created.
> >
> > SQL> insert into one values (3);
> >
> > 1 row created.
> >
> > SQL> insert into one values (1);
> >
> > 1 row created.
> >
> > SQL> select * from one;
> >
> >          A
> > ----------
> >          2
> >          3
> >          1
> >
> > SQL> update one set a=a+1;
> >
> > 3 rows updated.
> >
> > SQL> select * from one;
> >
> >          A
> > ----------
> >          3
> >          4
> >          2
> >
>
> Man, how do you implement that behavior?  No wonder MySQL fails on it
> too.

    I don't know...the one suggestion that was made seemed to make
about the most sense...

    If update is atomic, then it should allow you to change all the
resultant fields and then try to commit it.  After all the fields are
changed, then it becomes 3,4,2 instead of 2,3,1, and, therefore, is all
unique...



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [QUESTIONS] Business cases
Следующее
От: ocie@paracel.com
Дата:
Сообщение: Re: [HACKERS] Re: [QUESTIONS] Business cases