Re: POC: converting Lists into arrays

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: POC: converting Lists into arrays
Дата
Msg-id CAH2-WznX=dooG6erxoa9LKh0dqVRCCYxK0N-nucqD1sth=UmOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC: converting Lists into arrays  (Andres Freund <andres@anarazel.de>)
Ответы Re: POC: converting Lists into arrays  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, Feb 25, 2019 at 1:31 PM Andres Freund <andres@anarazel.de> wrote:
> > Andres said that he doesn't like the pg_list.h API. It's not pretty,
> > but is it really that bad?
>
> Yes. The function names alone confound anybody new to postgres, we tend
> to forget that after a few years. A lot of the function return types are
> basically unpredictable without reading the code, the number of builtin
> types is pretty restrictive, and there's no typesafety around the choice
> of actually stored.

But a lot of those restrictions are a consequence of needing what
amount to support functions in places as distant from pg_list.h as
pg_stat_statements.c, or the parser, or outfuncs.c. I'm not saying
that we couldn't do better here, but the design is constrained by
this. If you add a support for a new datatype, where does that leave
stored rules? Seems ticklish to me, at the very least.

-- 
Peter Geoghegan


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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Remove Deprecated Exclusive Backup Mode
Следующее
От: Andres Freund
Дата:
Сообщение: Re: POC: converting Lists into arrays