Lists: | pgsql-hackers |
---|
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-17 12:58:28 |
Message-ID: | 20100817205828.5e0fe8e7.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Sorry.
I forget to attach the patch file.
Begin forwarded message:
Date: Mon, 16 Aug 2010 19:49:20 +0800
From: Quan Zongliang <quanzongliang(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: patch for pg_ctl.c to add windows service start-type
Hi, all
I modified pg_ctl.c to add a new option for Windows service start-type.
new option is -S [auto|demand]
For example, the command can be used under Windows:
pg_ctl register -N "s-name" -S auto
or
pg_ctl register -N "s-name" -S demand
The created service will be SERVICE_AUTO_START or SERVICE_DEMAND_START respectively.
regards
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
Attachment | Content-Type | Size |
---|---|---|
pg_ctl.patch | application/octet-stream | 4.4 KB |
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-17 14:18:42 |
Message-ID: | AANLkTim3ToGN1FfEPH3JOvonYQBF1AsMe5gVj6gY0ZpW@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Aug 17, 2010 at 2:58 PM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
>
> Sorry.
> I forget to attach the patch file.
Without looking at the details of this patch, it looks reasonable - so
please put it on the commitfest page, if you haven't already.
It does, however, lack documentation updates - that needs to be done
before it can get applied.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 14:24:54 |
Message-ID: | 20100819222454.4aa7e091.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
documents attached. html and man-page
On Tue, 17 Aug 2010 16:18:42 +0200
Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Tue, Aug 17, 2010 at 2:58 PM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> >
> > Sorry.
> > I forget to attach the patch file.
>
> Without looking at the details of this patch, it looks reasonable - so
> please put it on the commitfest page, if you haven't already.
>
> It does, however, lack documentation updates - that needs to be done
> before it can get applied.
>
> --
> Magnus Hagander
> Me: http://www.hagander.net/
> Work: http://www.redpill-linpro.com/
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
Attachment | Content-Type | Size |
---|---|---|
pg_ctl.zip | application/zip | 9.3 KB |
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 15:48:53 |
Message-ID: | 20100819154853.GA1738@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Aug 19, 2010 at 10:24:54PM +0800, Quan Zongliang wrote:
> documents attached. html and man-page
Thanks!
For future reference, the way to patch docs is by patching the SGML
source. Please find enclosed a patch which incorporates the code
patch you sent with these docs.
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
Attachment | Content-Type | Size |
---|---|---|
pg_ctl_win.diff | text/plain | 4.4 KB |
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Quan Zongliang <quanzongliang(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 19:47:43 |
Message-ID: | 1282247161-sup-2787@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010:
> + <varlistentry>
> + <term><option>-S <replaceable class="parameter"></replaceable></option></term>
You omitted the start-type inside the <replaceable> tag. Also, the "a"
and "d" values seem to be accepted but not documented.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Quan Zongliang <quanzongliang(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 20:40:18 |
Message-ID: | 20100819204018.GA24472@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote:
> Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010:
>
> > + <varlistentry>
> > + <term><option>-S <replaceable class="parameter"></replaceable></option></term>
>
> You omitted the start-type inside the <replaceable> tag. Also, the "a"
> and "d" values seem to be accepted but not documented.
D'oh! Changed patch enclosed. Now in context format :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
Attachment | Content-Type | Size |
---|---|---|
pg_ctl_win2.diff | text/plain | 5.8 KB |
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Quan Zongliang <quanzongliang(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 20:48:53 |
Message-ID: | 1282250821-sup-8424@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Excerpts from David Fetter's message of jue ago 19 16:40:18 -0400 2010:
> On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote:
> > Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010:
> >
> > > + <varlistentry>
> > > + <term><option>-S <replaceable class="parameter"></replaceable></option></term>
> >
> > You omitted the start-type inside the <replaceable> tag. Also, the "a"
> > and "d" values seem to be accepted but not documented.
>
> D'oh! Changed patch enclosed. Now in context format :)
Thanks.
Another thing -- why is there an enum at all? Seems it'd be
simpler to assign the right value to the variable in the getopt() code
to start with.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Quan Zongliang <quanzongliang(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 20:51:08 |
Message-ID: | 20100819205108.GB24472@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Aug 19, 2010 at 04:48:53PM -0400, Alvaro Herrera wrote:
> Excerpts from David Fetter's message of jue ago 19 16:40:18 -0400 2010:
> > On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote:
> > > Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010:
> > >
> > > > + <varlistentry>
> > > > + <term><option>-S <replaceable class="parameter"></replaceable></option></term>
> > >
> > > You omitted the start-type inside the <replaceable> tag. Also,
> > > the "a" and "d" values seem to be accepted but not documented.
> >
> > D'oh! Changed patch enclosed. Now in context format :)
>
> Thanks.
>
> Another thing -- why is there an enum at all? Seems it'd be simpler
> to assign the right value to the variable in the getopt() code to
> start with.
That's a question for the patch author. I was just cleaning up the
docs :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 23:01:54 |
Message-ID: | 20100820070154.7096ab15.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Because Windows's CreateService has serial start-type:
SERVICE_AUTO_START
SERVICE_BOOT_START
SERVICE_DEMAND_START
SERVICE_DISABLED
SERVICE_SYSTEM_START
Although all of them are not useful for pg service.
I think it is better to use enum.
On Thu, 19 Aug 2010 16:48:53 -0400
Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from David Fetter's message of jue ago 19 16:40:18 -0400 2010:
> > On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote:
> > > Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010:
> > >
> > > > + <varlistentry>
> > > > + <term><option>-S <replaceable class="parameter"></replaceable></option></term>
> > >
> > > You omitted the start-type inside the <replaceable> tag. Also, the "a"
> > > and "d" values seem to be accepted but not documented.
> >
> > D'oh! Changed patch enclosed. Now in context format :)
>
> Thanks.
>
> Another thing -- why is there an enum at all? Seems it'd be
> simpler to assign the right value to the variable in the getopt() code
> to start with.
>
> --
> Álvaro Herrera <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-19 23:04:13 |
Message-ID: | 20100820070413.a6887c5c.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I don't know how to edit documents exactly before.
Thanks.
On Thu, 19 Aug 2010 08:48:53 -0700
David Fetter <david(at)fetter(dot)org> wrote:
> On Thu, Aug 19, 2010 at 10:24:54PM +0800, Quan Zongliang wrote:
> > documents attached. html and man-page
>
> Thanks!
>
> For future reference, the way to patch docs is by patching the SGML
> source. Please find enclosed a patch which incorporates the code
> patch you sent with these docs.
>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-20 09:21:18 |
Message-ID: | AANLkTikxj-1ZyZd+32PiGPWQrh7zN-uQtekmXDcWEp+O@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Fri, Aug 20, 2010 at 01:01, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> Because Windows's CreateService has serial start-type:
> SERVICE_AUTO_START
> SERVICE_BOOT_START
> SERVICE_DEMAND_START
> SERVICE_DISABLED
> SERVICE_SYSTEM_START
>
> Although all of them are not useful for pg service.
> I think it is better to use enum.
I don't see us ever using anything other than auto or demand. The
others aren't for "regular services", except for "disabled". And
adding a disabled service makes no sense :-) So I'm with Alvaro, I
think it's a good idea to simplify that.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-22 14:03:32 |
Message-ID: | 20100822220332.6688a11c.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Sure, I agree.
New patch attached. How about this?
On Fri, 20 Aug 2010 11:21:18 +0200
Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Fri, Aug 20, 2010 at 01:01, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> > Because Windows's CreateService has serial start-type:
> > SERVICE_AUTO_START
> > SERVICE_BOOT_START
> > SERVICE_DEMAND_START
> > SERVICE_DISABLED
> > SERVICE_SYSTEM_START
> >
> > Although all of them are not useful for pg service.
> > I think it is better to use enum.
>
> I don't see us ever using anything other than auto or demand. The
> others aren't for "regular services", except for "disabled". And
> adding a disabled service makes no sense :-) So I'm with Alvaro, I
> think it's a good idea to simplify that.
>
>
> --
> Magnus Hagander
> Me: http://www.hagander.net/
> Work: http://www.redpill-linpro.com/
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
Attachment | Content-Type | Size |
---|---|---|
pg_ctl.diff | text/plain | 3.9 KB |
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-22 15:25:59 |
Message-ID: | 20100822152559.GB31339@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sun, Aug 22, 2010 at 10:03:32PM +0800, Quan Zongliang wrote:
> Sure, I agree.
> New patch attached. How about this?
Docs re-added. Please not to leave these out in future patches. :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
Attachment | Content-Type | Size |
---|---|---|
pg_ctl_win3.diff | text/plain | 4.4 KB |
From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-24 12:05:55 |
Message-ID: | 20100824200555.c016cad0.quanzongliang@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Which files need be modified?
sgml, html, and man-page or only sgml?
I am not familiar with this.
On Sun, 22 Aug 2010 08:25:59 -0700
David Fetter <david(at)fetter(dot)org> wrote:
> On Sun, Aug 22, 2010 at 10:03:32PM +0800, Quan Zongliang wrote:
> > Sure, I agree.
> > New patch attached. How about this?
>
> Docs re-added. Please not to leave these out in future patches. :)
>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Quan Zongliang <quanzongliang(at)gmail(dot)com>
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-08-24 12:11:06 |
Message-ID: | AANLkTikte7dZ12BATUhQvmW0iODeVZfMyMuMwM9Y5ewo@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Aug 24, 2010 at 2:05 PM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> Which files need be modified?
> sgml, html, and man-page or only sgml?
> I am not familiar with this.
Only SGML. HTML and man pages are generated from the SGML.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-09-30 02:40:10 |
Message-ID: | AANLkTi=4Ck+jWeEQ++f5yNyGBmypnivwNqV=JOC8DF_p@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi, I have a question about the latest patch.
On Sun, Aug 22, 2010 at 11:03 PM, Quan Zongliang
<quanzongliang(at)gmail(dot)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
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
Cc: | Quan Zongliang <quanzongliang(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fw: patch for pg_ctl.c to add windows service start-type |
Date: | 2010-09-30 08:12:15 |
Message-ID: | AANLkTik1bKo_YRkO1bW6mKnsBkfXSRVFROWejYrR8oqn@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Sep 30, 2010 at 04:40, Itagaki Takahiro
<itagaki(dot)takahiro(at)gmail(dot)com> wrote:
> Hi, I have a question about the latest patch.
>
> On Sun, Aug 22, 2010 at 11:03 PM, Quan Zongliang
> <quanzongliang(at)gmail(dot)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,
I think it's modeled on what we allow for the "-m" parameter, and ISTM
it's good to keep those consistent.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/