Re: Review of Writeable CTE Patch

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Review of Writeable CTE Patch
Дата
Msg-id 603c8f071002030849p6a470565i5938eb43207881e8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review of Writeable CTE Patch  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Список pgsql-hackers
On Wed, Feb 3, 2010 at 11:18 AM, Marko Tiikkaja
<marko.tiikkaja@cs.helsinki.fi> wrote:
>> In ExecTopLevelStmtIsReadOnly, you might perhaps want to rephase the
>> comment in a way that doesn't use the word "Ehm."  Like maybe: "Even
>> if this function returns true, the statement might still contain
>> INSERT,
>> UPDATE, or DELETE statements within a CTE; we only check the top-level
>> statement."  Also, there should be a newline immediately before the
>> function name, per our usual style conventions.
>
> That comment tries to emphasize the fact that I can't think of any
> reasonable name for that particular function.  If the name looks OK, I
> can update the comment.

Name seems fine.  Just fix the comment.

>> The limitations of INSERT/UPDATE/DELETE-within-WITH should be
>> documented somewhere: top level CTE only, and no DO ALSO or
>> conditional DO INSTEAD rules.  If we don't intend to remove this
>> limitation in a future release, we should probably also document that.
>>  I believe there are some other caveats that we've discussed before,
>> too, though I'm not sure if they're still true.  Stuff like:
>>
>> - CTEs will be executed to completion in sequential order before the
>> main statement begins execution
>> - each CTE will see the results of CTEs already executed, and the main
>> statement will see the results of all CTEs
>> - but queries within each CTE still won't see their own updates (a
>> reference to whatever section of the manual we talk about this in
>> would probably be good)
>> - possible pitfalls of CTEs not being pipelined
>
> Right.  The documentation in its current state is definitely lacking.
> I've tried to focus all the time I have in making this patch technically
> good.

Well, technically good is certainly a good place to start.  :-)  Of
course, we need the docs, too.  Thanks for your work on this.

...Robert


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

Предыдущее
От: Chris Campbell
Дата:
Сообщение: Re: Recent vendor SSL renegotiation patches break PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hot Standby and VACUUM FULL