Re: doc: update PL/pgSQL sample loop function

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: doc: update PL/pgSQL sample loop function
Дата
Msg-id CAA4eK1KoDtz4bsNLZsTP-LpJ6LZ1kHoHosTuA2veK+UQBNKBWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc: update PL/pgSQL sample loop function  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: doc: update PL/pgSQL sample loop function  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, Aug 29, 2019 at 10:07 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> Hi
>
> čt 29. 8. 2019 v 5:03 odesílatel Ian Barwick <ian.barwick@2ndquadrant.com> napsal:
>>
>> Hi
>>
>> Here:
>>
>>    https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-RECORDS-ITERATING
>>
>> we have a sample PL/PgSQL function (dating from at least 7.2) demonstrating
>> query result loops, which refreshes some pseudo materialized views stored in
>> a user-defined table.
>>
>> As we've had proper materialized views since 9.3, I thought it might
>> be nice to update this with a self-contained sample which can be used
>> as-is; see attached patch.
>>
>> (As a side note the current sample function contains a couple of "%s"
>> placeholders which should be just "%"; a quick search of plpgsql.sgml
>> shows this is the only place they occur).
>>
>> Will submit to the next commitfest.
>
> +1
>

The current example shows the usage of looping in plpgsql, so as such
there is no correctness issue, but OTOH there is no harm in updating
the example as proposed by Ian Barwick.  Does anyone else see any
problem with this idea?  If we agree to proceed with this update, it
might be better to backpatch it for the sake of consistency though I
am not sure about that.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [DOC] Document auto vacuum interruption
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Should we add xid_current() or a int8->xid cast?