Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Дата
Msg-id 20090110001805.GJ20555@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Tom Lane wrote:

> I guess I'm still wondering which part of this actually needs to be
> hand-coded so that it can be flexible.  I'm envisioning the whole
> loop replaced by something like
>
>     FillRelOptions((void *) rdopts, options, &constanttable);
>
> where the constant table contains entries like
>
>     { "fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor) }

I attach a patch that does things this way (it includes the btree test
code because I'm too lazy right now to strip it out).

I'm not really sure about removing the other macros completely, because
they would be useful whenever one wanted to create something
nonstandard.


> BTW, are we just assuming that there's never a possibility of no match?
> It seems like there ought to be an elog complaint if you get to the
> bottom of the loop; which again is something I don't see the point of
> writing out each time.

We need to be quiet about it when not validating, I think.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Вложения

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Improving compressibility of WAL files
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)