Re: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Дата
Msg-id CAKFQuwbj=amhZhGYrLLUmOd1p7jaD14gmFd5CriCTjmOmw_Teg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Mon, May 23, 2016 at 12:01 PM, Jeff Davis <pgsql@j-davis.com> wrote:
On Fri, May 20, 2016 at 1:41 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> How does the relatively new FILTER clause play into this, if at all?

My interpretation of the standard is that FILTER is not allowable for
a window function, and IGNORE|RESPECT NULLS is not allowable for an
ordinary aggregate.

So if we support IGNORE|RESPECT NULLS for anything other than a window
function, we have to come up with our own semantics.

> We already have "STRICT" for deciding whether a function processes nulls.
> Wouldn't this need to exist on the "CREATE AGGREGATE"

STRICT defines behavior at DDL time. I was suggesting that we might
want a DDL-time flag to indicate whether a function can make use of
the query-time IGNORE|RESPECT NULLS option. In other words, most
functions wouldn't know what to do with IGNORE|RESPECT NULLS, but
perhaps some would if we allowed them the option.

Perhaps I didn't understand your point?

​The "this" in the quote doesn't refer to STRICT but rather the non-existence feature that we are talking about.​

​I am trying to make the point that the DDL syntax for "RESPECT|IGNORE NULLS"​ should be on the "CREATE AGGREGATE" page and not the "CREATE FUNCTION" page.

As far as a plain function cares its only responsibility with respect to NULLs is defined by the STRICT property.  As this behavior only manifests in aggregate situations the corresponding property should be defined there as well.

David J.







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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Latent cache flush hazard in RelationInitIndexAccessInfo
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Parallel safety tagging of extension functions