Re: COPY and Volatile default expressions

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: COPY and Volatile default expressions
Дата
Msg-id CA+U5nMLKhqOr8DXMp8QCOvHYEyEouuJQqEX-1z1cWX2Ym0FCmg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: COPY and Volatile default expressions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 15 April 2013 20:52, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Apr 15, 2013 at 11:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I claim this is a common class, since sequence next_val functions and
>>> uuid generators meet that criteria and most common forms of auditing
>>> trigger, as well as any other form of data-reformatting trigger.
>>
>> I don't believe that it's a good idea to consider nextval() to be
>> reorderable, so I'm not convinced by your argument here.
>
> Why not?
>
> I admit that I can't convince myself that it's safe.  But I can't
> think of a concrete example where it breaks anything, either.


I'm not sure exactly if the corect label is "reorderable" or some
other word that describes this specific situation. "Parallel
independent" probably would work, since if we had a DML statement that
worked in 2 separate processes we'd probably want to know that the
rows in each could be divided up without changing the result.

It looks straightforward to put in a special case check for sequences,
which is the most important use case. Sequences are a recognised
database object, so such a special case could be justified... shame
about the other use cases though, e.g. UUIDs.

I guess we can generalise it when we have a better idea of whether
this does indeed make a useful generalisation.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query not using index for user defined type
Следующее
От: Robert Haas
Дата:
Сообщение: Re: COPY and Volatile default expressions