Re: [HACKERS] Win32 WEXITSTATUS too

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Subject: Re: [HACKERS] Win32 WEXITSTATUS too
Date: 2007-01-23 01:46:44
Message-ID: 200701230146.l0N1kiB01631@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


OK, I have tested on MinGW and found I can use FormatMessage() to print
a description for all ERROR* system() failures, rather than print a hex
value. This removes the need for a URL or lookup of hex values.
Attached and applied.

---------------------------------------------------------------------------

Bruce Momjian wrote:
> bruce wrote:
> > Tom Lane wrote:
> > > Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > > > Bruce Momjian wrote:
> > > >> OK, maybe /doc or src/tools. A more radical approach would be to put
> > > >> the list in our documentation, or have initdb install it.
> > >
> > > > Why not put it in techdocs or some such?
> > >
> > > I think we've learned by now that putting copies of other peoples' code
> > > in our tree isn't such a hot idea; what is going to cause it to be
> > > updated when things change? How do you know the values are even the
> > > same across all the Windows versions we support?
> > >
> > > Basically this whole idea is misconceived. Just print the number and
> > > have done.
> >
> > And how do people interpret that number?
>
> Ah, I found something:
>
> http://support.microsoft.com/kb/259693
>
> Someone on IRC says that is kernel mode only, and is looking for a
> user-mode version, so we would be able to print out a meaningful message
> rather than a hex value that has to be looked up.
>
> --
> Bruce Momjian bruce(at)momjian(dot)us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2007-01-23 01:51:26 Would this SPI function be useful?
Previous Message Kenneth Marshall 2007-01-23 00:53:31 Re: [GENERAL] Autovacuum Improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Takayuki Tsunakawa 2007-01-23 01:58:17 Re: [HACKERS] Win32 WEXITSTATUS too
Previous Message Bruce Momjian 2007-01-23 01:37:54 Re: [HACKERS] Win32 WEXITSTATUS too