I'll save the full rant for my blog :), but wanted to submit this documentation 
patch for this listen gotcha that's been bugging me for a while. I'd like 
to see LISTEN and NOTIFY changed to use a simple text string, but until then, 
I think we should probably warn about the chopping off of the left-hand part.


Index: listen.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/listen.sgml,v
retrieving revision 1.22
diff -c -r1.22 listen.sgml
*** listen.sgml 16 Sep 2006 00:30:19 -0000      1.22
--- listen.sgml 20 Feb 2007 18:18:15 -0000
***************
*** 33,38 ****
--- 33,44 ----
     class="PARAMETER">name</replaceable>.
     If the current session is already registered as a listener for
     this notification condition, nothing is done.
+    Note that because <replaceable class="PARAMETER">name</replaceable> 
+    is a relation name, all but the last section will be dropped if the 
+    name has any dots in it: LISTEN employee, LISTEN newyork.employee, 
+    and LISTEN unitedstates.newyork.employee all register the name 
+    employee. Users needing to separate words should use an underscore 
+    instead of a dot.
    </para>
  
    <para>



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to