Re: tsearch_core patch: permissions and security issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tsearch_core patch: permissions and security issues
Дата
Msg-id 15782.1181839978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: tsearch_core patch: permissions and security issues  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: tsearch_core patch: permissions and security issues  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: tsearch_core patch: permissions and security issues  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Well assuming we have any SQL-level support at all I think we should
> strive to avoid these functions taking INTERNAL arguments.

I don't think I want to get into redesigning the patch at that level of
detail, at least not for 8.3.  It seems like something possibly worth
thinking about for 8.4 though.  The idea that we might want to change
the API for parser and dictionary support routines seems like another
good argument for not exposing user-level facilities for creating them
right now.

What I'm realizing as I look at it is that this is an enormous patch,
and it's not as close to being ready to apply as I had supposed.  If we
don't scale it back, then either it doesn't get into 8.3 or 8.3 gets
delayed a whole lot longer.  So we need to look at what we can trim or
postpone for a later release.

So all these factors seem to me to point in the same direction: at least
for the time being, we should treat TS parsers and dictionaries the way
we treat index access methods.  There'll be a catalog, which the
adventurous can insert new entries into, but no SQL-level support for
doing it, hence no pg_dump support.  And we reserve the right to whack
around the API for the functions referenced by the catalog entries.

That still leaves us with the question of SQL-level support for TS
configurations, which are built on top of parsers and dictionaries.
We definitely need some level of capability for that.  For the
permissions and dependencies issues, the minimalistic approach is to
say "only superusers can create or alter TS configurations, and if you
alter one it's your responsibility to fix up any dependent tsvector
columns or indexes."  We currently handle index operator classes that
way, so it's not completely ridiculous.  Sure it would be nice to do
better, but maybe that's a post-8.3 project.

That gets us down to just needing to worry about whether we like the
SQL representation of configurations.  Which is still a nontrivial
issue, but at least it seems manageable on a timescale that's
reasonable for 8.3.
        regards, tom lane


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Sorted writes in checkpoint
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: tsearch_core patch: permissions and security issues