Re: [HACKERS] Using postgres planner as standalone component

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Using postgres planner as standalone component
Дата
Msg-id 29222.1499012547@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Using postgres planner as standalone component  (Ricky Stevens <ristevenj@gmail.com>)
Список pgsql-hackers
Ricky Stevens <ristevenj@gmail.com> writes:
> For one of my personal projects I am interested in using the PostgreSQL
> planner as a standalone library. However, I would like to run this as an
> embedded library instead of actually creating anything on disk.

I'm not really clear on what value that would have.  Aside from the
problem you mentioned that lots of information comes from the PG
system catalogs, there are a lot of other issues large and small:

* the code depends extensively on the PG backend programming environment
(palloc and elog, for instance);

* the input data structure is a PG-specific query representation, and
the output structure is a PG-specific plan representation;

* the knowledge that it has is all about the behavior of PG-specific
operators and execution plan types.

By the time you got done dealing with all that, either you'd have imported
pretty much the entire Postgres system into your "standalone library",
or you'd have done so much rewrite work that you might as well have
started from scratch.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Race-like failure in recovery/t/009_twophase.pl
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: [HACKERS] Multi column range partition table