Next: , Previous: , Up: Top   [Contents][Index]


10 Displaying Results

If procedure pg-print does not do what you want (see Writing/Reading Data), you can try a slightly more customizable method for displaying results.

NB: This module will be removed by 2015-12-31.

To get started, load the postgres-resdisp module:

(use-modules (database postgres-resdisp))
Procedure: display-result result [decor [flags…]]

Display result, including header and ASCII decoration. result is an object that satisfies pg-result?. Optional second arg decor is a symbol, one of:

space
h-only v-only +-only
no-h no-v no-+
fat-space fat-no-v fat-h-only

If omitted or #f, the default is to use "-", "|" and "+" for the horizontal, vertical and intersection decorations, respectively. The rest of the args, flags, are symbols that configure various parts of the output. Recognized flags:

no-top-hr no-mid-hr no-bot-hr
no-L no-R no-LR

These inhibit the horizonal rule at the top of the output, between the header and the table body, and at the bottom of the output, respectively; as well as the left and right decorations.