Re: proper format for printing GetLastError() - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: proper format for printing GetLastError()
Date
Msg-id CAEYLb_VcmRv=GWwV1ZsPuf5vv9DHvjgGsZDT=1PPFHyyn7L59Q@mail.gmail.com
Whole thread Raw
In response to Re: proper format for printing GetLastError()  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Yeah, I noticed that myself recently.

On 6 July 2011 12:48, Magnus Hagander <magnus@hagander.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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: proper format for printing GetLastError()
Next
From: Simon Riggs
Date:
Subject: Re: Cascade replication