forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite6311b4
committed
The attached patch implements some changes that were discussed acouple weeks ago on the hackers and interfaces lists:1. When the backend sends a NOTICE message and closes the connection (typically, because it was told to by the postmaster after another backend coredumped), libpq will now print the notice and close the connection cleanly. Formerly, the frontend app would usually terminate ungracefully due to a SIGPIPE. (I am not sure if 6.3.2 behaved that way, but the current cvs sources do...)2. libpq's various printouts to stderr are now fed through a single "notice processor" routine, which can be overridden by the application to direct notices someplace else. This should ease porting libpq to Windows.I also noticed and fixed a problem in PQprint: when sending outputto a pager subprocess, it would disable SIGPIPE in case the pagerterminates early (this is good) --- but afterwards it reset SIGPIPEto SIG_DFL, rather than restoring the application's prior setting(bad).regards, tom lane
1 parente46df2f commite6311b4
File tree
7 files changed
+219
-258
lines changed- src
- interfaces/libpq
- man
7 files changed
+219
-258
lines changedLines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
445 | 445 |
| |
446 | 446 |
| |
447 | 447 |
| |
448 |
| - | |
449 |
| - | |
450 | 448 |
| |
451 | 449 |
| |
452 | 450 |
| |
|
Lines changed: 43 additions & 73 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 | 32 |
| |
34 | 33 |
| |
35 | 34 |
| |
| |||
55 | 54 |
| |
56 | 55 |
| |
57 | 56 |
| |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 | 184 |
| |
188 |
| - | |
189 | 185 |
| |
190 | 186 |
| |
191 | 187 |
| |
| |||
297 | 293 |
| |
298 | 294 |
| |
299 | 295 |
| |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 | 296 |
| |
304 |
| - | |
305 | 297 |
| |
306 | 298 |
| |
307 | 299 |
| |
| |||
856 | 848 |
| |
857 | 849 |
| |
858 | 850 |
| |
| 851 | + | |
859 | 852 |
| |
860 | 853 |
| |
861 | 854 |
| |
| |||
925 | 918 |
| |
926 | 919 |
| |
927 | 920 |
| |
928 |
| - | |
929 |
| - | |
930 |
| - | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
931 | 925 |
| |
932 |
| - | |
933 |
| - | |
934 |
| - | |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 |
| - | |
955 |
| - | |
956 |
| - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
957 | 935 |
| |
958 | 936 |
| |
959 | 937 |
| |
| |||
987 | 965 |
| |
988 | 966 |
| |
989 | 967 |
| |
990 |
| - | |
991 |
| - | |
992 |
| - | |
| 968 | + | |
993 | 969 |
| |
994 | 970 |
| |
995 | 971 |
| |
| |||
1003 | 979 |
| |
1004 | 980 |
| |
1005 | 981 |
| |
1006 |
| - | |
1007 |
| - | |
1008 |
| - | |
| 982 | + | |
1009 | 983 |
| |
1010 | 984 |
| |
1011 | 985 |
| |
| |||
1383 | 1357 |
| |
1384 | 1358 |
| |
1385 | 1359 |
| |
1386 |
| - | |
1387 |
| - | |
1388 | 1360 |
| |
1389 |
| - | |
1390 | 1361 |
| |
1391 | 1362 |
| |
1392 | 1363 |
| |
1393 | 1364 |
| |
1394 | 1365 |
| |
1395 | 1366 |
| |
1396 | 1367 |
| |
1397 |
| - | |
1398 |
| - | |
1399 | 1368 |
| |
1400 |
| - | |
1401 | 1369 |
| |
1402 | 1370 |
| |
1403 | 1371 |
| |
1404 | 1372 |
| |
1405 | 1373 |
| |
1406 | 1374 |
| |
1407 | 1375 |
| |
1408 |
| - | |
1409 |
| - | |
1410 | 1376 |
| |
1411 |
| - | |
1412 |
| - | |
1413 | 1377 |
| |
1414 | 1378 |
| |
1415 | 1379 |
| |
1416 | 1380 |
| |
1417 | 1381 |
| |
1418 | 1382 |
| |
1419 | 1383 |
| |
1420 |
| - | |
1421 |
| - | |
1422 | 1384 |
| |
1423 |
| - | |
1424 | 1385 |
| |
1425 | 1386 |
| |
1426 | 1387 |
| |
1427 | 1388 |
| |
1428 | 1389 |
| |
1429 | 1390 |
| |
1430 | 1391 |
| |
1431 |
| - | |
1432 |
| - | |
1433 | 1392 |
| |
1434 |
| - | |
1435 | 1393 |
| |
1436 | 1394 |
| |
1437 | 1395 |
| |
1438 | 1396 |
| |
1439 | 1397 |
| |
1440 | 1398 |
| |
1441 | 1399 |
| |
1442 |
| - | |
1443 |
| - | |
1444 | 1400 |
| |
1445 |
| - | |
1446 | 1401 |
| |
1447 | 1402 |
| |
1448 | 1403 |
| |
1449 | 1404 |
| |
1450 | 1405 |
| |
1451 | 1406 |
| |
1452 | 1407 |
| |
1453 |
| - | |
1454 |
| - | |
1455 | 1408 |
| |
1456 |
| - | |
1457 | 1409 |
| |
1458 | 1410 |
| |
1459 | 1411 |
| |
1460 | 1412 |
| |
1461 | 1413 |
| |
1462 | 1414 |
| |
| 1415 | + | |
1463 | 1416 |
| |
1464 |
| - | |
1465 |
| - | |
1466 |
| - | |
1467 |
| - | |
| 1417 | + | |
1468 | 1418 |
| |
1469 | 1419 |
| |
1470 | 1420 |
| |
1471 | 1421 |
| |
1472 | 1422 |
| |
1473 | 1423 |
| |
1474 | 1424 |
| |
1475 |
| - | |
1476 |
| - | |
1477 | 1425 |
| |
1478 |
| - | |
1479 | 1426 |
| |
1480 | 1427 |
| |
1481 | 1428 |
| |
| |||
1501 | 1448 |
| |
1502 | 1449 |
| |
1503 | 1450 |
| |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + |
0 commit comments
Comments
(0)