Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]
Дата
Msg-id CAFj8pRBhokukUnmJ6b5VEvKBa6ezs+aiHtXZRpMzoByseTK_eA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]  (Quan Zongliang <quanzongliang@yeah.net>)
Список pgsql-hackers


po 16. 10. 2023 v 13:56 odesílatel Daniel Gustafsson <daniel@yesql.se> napsal:
> On 16 Oct 2023, at 12:15, Quan Zongliang <quanzongliang@yeah.net> wrote:

> Implement TODO item:
> PL/pgSQL
> Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

Cool!  While I haven't looked at the patch yet, I've wanted this myself many
times in the past when working with large plpgsql codebases.

> As a first step, deal only with [], such as
> xxx.yyy%TYPE[]
> xxx%TYPE[]
>
> It can be extended to support multi-dimensional and complex syntax in the future.

Was this omitted due to complexity of implementation or for some other reason?

There is no reason for describing enhancement. The size and dimensions of postgresql arrays are dynamic, depends on the value, not on declaration. Now, this information is ignored, and can be compatibility break to check and enforce this info.


--
Daniel Gustafsson



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]
Следующее
От: Nikita Malakhov
Дата:
Сообщение: Re: Pro et contra of preserving pg_proc oids during pg_upgrade