Re: proper format for printing GetLastError()

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proper format for printing GetLastError()
Date: 2011-07-06 12:11:17
Message-ID: CAEYLb_VcmRv=GWwV1ZsPuf5vv9DHvjgGsZDT=1PPFHyyn7L59Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yeah, I noticed that myself recently.

On 6 July 2011 12:48, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> Nope. I think it's only in there because of lazyness, in general. %lu
> seems to be the correct choice.

Yes, it's the correct choice.

>> Thirdly, why are we not trying to print a textual message?
>
> I'd say that depends on where it is. In some cases probably  because
> it's "can never happen" messages. In other cases because, well, no
> reason :)

I'd also say it has something to do with the win32 API being as ugly
and counter-intuitive as it is. Take a look at this:

http://msdn.microsoft.com/en-us/library/ms680582(v=VS.85).aspx

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-07-06 12:35:22 Re: Cascade replication
Previous Message Magnus Hagander 2011-07-06 11:48:30 Re: proper format for printing GetLastError()