kg@kgb.une.edu. au (Klint Gore) writes:
Does anyone know of a mailing list for application developers using
postgres? It'd probably be more relevant than pgsql-general for my
question.
Failing that, what do people use to generate reports with a postgres
back end? I have a requirement to produce a reporting daemon on linux
that doesn't require X windows (has to render the report and write it
back to a blob). I've been down a couple of paths that ended with
unusable/unsuitable products.
Unfortunately, "suitable" is all in the eye of the beholder.
(And a painful sting on the hand is in the eye of the bee-holder...)
A recent discussion thread on one of the Linux newsgroups involved a
proposal of a "reporting engine" coded mostly using M4 macro
rewriting.
<http://groups.google.c om/groups?hl=en&lr =&ie=UTF-8&threadm=c1a15 6a0.0402021228. 55e27b7c%40post ing.google.com& rnum=1&prev=/groups%3Fhl%3De n%26lr%3D%26ie% 3DISO-8859-1%26q%3Dpostgre sql%2Bm4%2Blinu x%2Breport%26sa %3DN%26tab%3Dwg >
The initiator's idea is well and good; the problems are all in the
requirements.
-> You likely need the "expressiveness " of HTML, with colour, custom
alignment of columns, font selection, and such, or, with raw
ASCII, perhaps not;
-> If the results are to be used by a GUI application, then it is
quite likely important to be able to construct partial results and
have a mechanism to render them at the "display widget" (whether
that be web browser, X app, or whatever) as you go along;
-> If the results are to be "batch-processed," partial results may
be irrelevant;
-> One person's notion of "easy to program" may not agree with another's
notion;
-> I know that the Proper Implementation Language is Common Lisp;
someone else thinks it's Python, another knows that the _only_
choice is Perl, another Tcl, another Java, and another C...
As soon as an implementation language is chosen, it has a
_significant_ effect on the "shape" of the solution, pointing at
the notion that, at least with computer languages, there is some
legitimacy to the Whorfian hypothesis that language shapes
cognition.
I know that where I can, I run queries and simply cut'n'paste the
output from psql, as that is a not-half-bad text-based presentation.
When it goes beyond that, people seem to head to using the libpq API
(or JDBC) to get data out, and then implement something in [favorite
language] to massage the results to get [favorite output format].
There are enough variations in the set of [favorite languages] and in
the set of [favorite output formats] that one size does not fit all.
--
output = reverse("gro.mc a" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/advocacy.html
"SIGTHTBABW : a signal sent from Unix to its programmers at random
intervals to make them remember that There Has To Be A Better Way."
-- Erik Naggum