Re: dblink_error_message return value
Joe Conway <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.documentation |
|---|---|
| Message-ID | <[email protected]> |
On 10/2/18 8:45 AM, Joe Conway wrote: > On 09/25/2018 03:58 PM, Joe Conway wrote: >> On 09/25/2018 01:50 PM, Joe Conway wrote: >>> On 08/08/2018 11:57 AM, Tom Lane wrote: >>>> =?utf-8?q?PG_Doc_comments_form?= <[email protected]> writes: >>>>> The following documentation comment has been logged on the website: >>>>> Documentation says: >>>> >>>>> Return Value >>>>> Returns last error message, or an empty string if there has been no error in >>>>> this connection. >>>>> Which is invalid. >>>>> Actually it returns 'OK' string if no error was raised. >>>> >>>> Good catch! The code's quite clear about it, but the SGML docs need >>>> fixed. >>> >>> >>> As mentioned on the nearby thread, will fix. I suppose this ought to be >>> back-patched. >>> >>> >>>>> Secondly >>>>> dblink_is_busy must be first called to make dblink_error_message returns an >>>>> error message. (Tested on 9.6.9) >>>> >>>> Meh. I see what you're getting at here, I think, but that seems like a >>>> completely wrong/misleading statement of the issue. Joe, can you think of >>>> better phraseology? >>> >>> Maybe a note, something like this? >>> ------------ >>> When asynchronous queries are initiated by dblink_send_query(), the >>> error message associated with the connection might not get updated until >>> the server's response message is consumed. This typically means that >>> dblink_is_busy() or dblink_get_result() should be called prior to >>> dblink_error_message(), so that any error generated by the asynchronous >>> query() will be visible. >>> ------------ >> >> And now with the corresponding patch attached. >> >> Thoughts/comments? > > > Going once, going twice, ... > (if no complaints will commit soon) Well, maybe not so soon, but now done. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJcaaXMAAoJEDfy90M199hl/WQP/0CkpqducvODhiQSr2ENKNqv aSX79ws1bAmVe7vWZuEhjn5XiMBNto9OBdayWUuKrfvgDGOz5w0J52yGyhyC0HEa +qZCwF2o/XA8dJOfefhuxpebqTd5MZFya6oGEqKuUvHqWNWb2l5Xhz3xczOXC2l0 OamZqyt768SG+gwOwgah36X3RLMzD+VceTeL/x6g1Bwdni1XD7o0x2hcy23asX3o zY5+LDsxEhIhtW/KZib5rbwZWEB2q1Aj5BBx49asXzGGqOjOh65ugSpY0/x8BmSc YtRw15mOW+GdKQCVRoJYfgnFtqipIMj4SlxOlAmU1s0eCoCsoUucVbyIMql7Dpmo mSDk0r+J2pTX8TYYUkGs5mBoR6P9h7wWFJ9pTHGHRBTT18JmcPnU3yWjje9USY/M z1YCsndI3rteC7xYo3K0qSA4vL/jAQEOHE7VTJKeKofjeIaufjzQ07XcKrCXUbqz SPaDvHIwk2IaLcmGkFoN45mq7lh/f5Io9IWiT8evqr5pUL8pVjJHxk1hHCUkt5c0 JmGKca83h4tpmqfEaO93M3twRETeIg24TzlaicyrMtRxH9b/dDc5KobpwFjOSurD 5iH6US1K0DIx5XBiEhGaZwr5i5cJeZuiXBX//5mIgU0wlj8uWAT1hjwZv+Wfqb54 /9sMOJfR88K0pDJRsoQz =jN2d -----END PGP SIGNATURE-----