Re: Allowing printf("%m") only where it actually works
От | Alvaro Herrera |
---|---|
Тема | Re: Allowing printf("%m") only where it actually works |
Дата | |
Msg-id | 20180528150125.j2x3mp62ssbeg3h5@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: Allowing printf("%m") only where it actually works (Thomas Munro <thomas.munro@enterprisedb.com>) |
Ответы |
Re: Allowing printf("%m") only where it actually works
|
Список | pgsql-hackers |
On 2018-May-27, Thomas Munro wrote: > Out of curiosity I tried adding a GetLastError variable for Windows > (to hide the function of that name and break callers) to the earlier > experimental patch (attached). I had to give it an initial value to > get rid of a warning about an unused variable (by my reading of the > documentation, __pragma(warning(suppress:4101)) can be used in macros > (unlike #pragma) and should shut that warning up, but it doesn't work > for me, not sure why). Of course that produces many errors since we > do that all over the place: > > https://ci.appveyor.com/project/macdice/postgres/build/1.0.184 Ouch. This seems to say that we oughta assign GetLastError() to saved_errno during errstart, then use %m in the errmsg() instead. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: