]> granicus.if.org Git - postgresql/commitdiff
doc: bgw_main takes a Datum argument, not void *.
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 27 Feb 2014 14:41:43 +0000 (11:41 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 27 Feb 2014 14:41:43 +0000 (11:41 -0300)
Per report from James Harper.

doc/src/sgml/bgworker.sgml

index 7ffeca5321aa9b3ed6f2ce07454075cbefd80ad2..f66cf7f20e8a86634ae1d0ce8e305c5348f1527a 100644 (file)
@@ -37,7 +37,7 @@
   from its <function>_PG_init()</>.
   The structure <structname>BackgroundWorker</structname> is defined thus:
 <programlisting>
-typedef void (*bgworker_main_type)(void *main_arg);
+typedef void (*bgworker_main_type)(Datum main_arg);
 typedef struct BackgroundWorker
 {
     char        bgw_name[BGW_MAXLEN];
@@ -94,7 +94,7 @@ typedef struct BackgroundWorker
   <para>
    <structfield>bgw_main</structfield> is a pointer to the function to run when
    the process is started.  This function must take a single argument of type
-   <type>void *</> and return <type>void</>.
+   <type>Datum</> and return <type>void</>.
    <structfield>bgw_main_arg</structfield> will be passed to it as its only
    argument.  Note that the global variable <literal>MyBgworkerEntry</literal>
    points to a copy of the <structname>BackgroundWorker</structname> structure