anchor.diff:      (show (pj:distinct 'human "favoriteFruit")))
     (values))
   
  -;;;; User defined SQL queries for when FILTER does not cut it.
  +;;;; User defined SQL queries for when FILTER and the other interface
  +;;;; functions are not sufficient.
   
   ;;; These must return JSON objects only.
   ;;; Macroexpand away to see the generated SQL.
   
   ;;; Try slime-edit-definition (M-.) on DEFINE-JSON-QUERY to read
  -;;; details on the syntactic sugar of j->, j->>, jbuild, to-json and
  -;;; also named parameter interpolation.
  +;;; details on the syntactic sugar of j->, j->>, jbuild, to-jsonb and
  +;;; also the named parameter interpolation.
   
   (define-json-query rich-humans$ (min-balance gender)
     (:order-by
   
  -   ;; jbuild makes a new JSON object with just the listed top level keys
  +   ;; jbuild makes a new JSON object which consists of just the
  +   ;; key/values pairs in the JSON document with the specified keys.
      (:select (jbuild ("key" "guid" "gender" "name" "balance"))
   
       :from 'human ;; this is why we need to set the search path above
                    ;; otherwise it would need to be 'pgj_model.history
   
  -    ;; j->> is a little syntactic sugar to get at the top level keys in 'jdoc
  -    ;; j->> returns text, so we must cast to Postgres number type for comparisons
  +    ;; j->> is a little syntactic sugar to get at the top level keys
  +    ;; in 'jdoc using the Postgres operator :->> which returns text.
  +    ;; So we must cast to a Postgres number type for comparisons.
       :where (:and (:>= (:type (j->> "balance") real) min-balance)
  +
                    (:= (j->> "gender") gender))) ;; can also do this using 'containment', see below
   
      (:type (j->> "balance") real)))
  
positive.code:    ;; comparing it with key "quantity".  Postgres operator -> gives
     ;; the raw jsonb of the key while Postgres operator ->>
     ;; converts it to text.  This library only uses Postgres type
     ;; jsonb. See also the Postgres docs at
     ;; http://www.postgresql.org/docs/9.4/static/functions-json.html
     ))
  
  
negative.code: 
  (defmacro with-pj-conn (() &body body)
    `(pomo:with-connection *connection*
       ;; We only need to set the search path for DEFINE-JSON-QUERY,
       ;; see below.  There is a small overhead for this, see
       ;; (alter-role-set-search-path) for a more permanent solution.
       (pomo:set-search-path *default-search-path*)
       ,@body))
  
  