@@ -129,8 +129,8 @@ sets the default cost for indexed searches for the optimizer.
129
129
</Para>
130
130
131
131
<Para>
132
- See the set(l)
133
- man page for information on the arguments for these environment variables.
132
+ Refer to the <command>SET</command> <acronym>SQL</acronym> command
133
+ for information on the arguments for these environment variables.
134
134
135
135
</Sect1>
136
136
@@ -1073,6 +1073,49 @@ void PQuntrace(PGconn *conn)
1073
1073
1074
1074
</Sect1>
1075
1075
1076
+ <Sect1>
1077
+ <Title>
1078
+ <FileName>libpq</FileName> Control Functions</Title>
1079
+
1080
+ <Para>
1081
+ <ItemizedList>
1082
+ <ListItem>
1083
+ <Para>
1084
+ <Function>PQsetNoticeProcessor</Function>
1085
+ Control reporting of notice and warning messages generated by libpq.
1086
+ <ProgramListing>
1087
+ void PQsetNoticeProcessor (PGconn * conn,
1088
+ void (*noticeProcessor) (void * arg, const char * message),
1089
+ void * arg)
1090
+ </ProgramListing>
1091
+ </Para>
1092
+ </ListItem>
1093
+ </ItemizedList>
1094
+ </Para>
1095
+
1096
+ <Para>
1097
+ By default, <filename>libpq</filename> prints "notice" messages from the backend on stderr,
1098
+ as well as a few error messages that it generates by itself.
1099
+ This behavior can be overridden by supplying a callback function that
1100
+ does something else with the messages. The callback function is passed
1101
+ the text of the error message (which includes a trailing newline), plus
1102
+ a void pointer that is the same one passed to <function>PQsetNoticeProcessor</function>.
1103
+ (This pointer can be used to access application-specific state if needed.)
1104
+ The default notice processor is simply
1105
+ <ProgramListing>
1106
+ static void
1107
+ defaultNoticeProcessor(void * arg, const char * message)
1108
+ {
1109
+ fprintf(stderr, "%s", message);
1110
+ }
1111
+ </ProgramListing>
1112
+
1113
+ <Para>
1114
+ To use a special notice processor, call <function>PQsetNoticeProcessor</function> just after
1115
+ any creation of a new PGconn object.
1116
+
1117
+ </Sect1>
1118
+
1076
1119
<Sect1>
1077
1120
<Title>User Authentication Functions</Title>
1078
1121
@@ -1124,7 +1167,7 @@ void fe_setauthsvc(char *name,
1124
1167
</Sect1>
1125
1168
1126
1169
<Sect1>
1127
- <Title>BUGS </Title>
1170
+ <Title>Caveats </Title>
1128
1171
1129
1172
<Para>
1130
1173
The query buffer is 8192 bytes long, and queries over
0 commit comments