Re: Fw: patch for pg_ctl.c to add windows service start-type

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: Fw: patch for pg_ctl.c to add windows service start-type
Дата
Msg-id AANLkTi=4Ck+jWeEQ++f5yNyGBmypnivwNqV=JOC8DF_p@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fw: patch for pg_ctl.c to add windows service start-type  (Quan Zongliang <quanzongliang@gmail.com>)
Ответы Re: Fw: patch for pg_ctl.c to add windows service start-type  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Hi, I have a question about the latest patch.

On Sun, Aug 22, 2010 at 11:03 PM, Quan Zongliang
<quanzongliang@gmail.com> wrote:
> New patch attached. How about this?
>> I don't see us ever using anything other than auto or demand. The
>> others aren't for "regular services"

+ set_starttype(char *starttypeopt)
+ {
+     if (strcmp(starttypeopt, "a") == 0 || strcmp(starttypeopt, "auto") == 0)
+         pgctl_start_type = SERVICE_AUTO_START;
+     else if (strcmp(starttypeopt, "d") == 0 || strcmp(starttypeopt,
"demand") == 0)
+         pgctl_start_type = SERVICE_DEMAND_START;

It accepts only "a" and "auto" for auto, but "au" or "aut" are rejected.
Is is an intended behavior?  I think we can use prefix match here because
we use the logic in some places. For example,

postgres=# SELECT 'tru'::bool, 'fal'::bool;bool | bool
------+------t    | f
(1 row)

-- 
Itagaki Takahiro


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Path question
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: I: About "Our CLUSTER implementation is pessimal" patch