Re: [SQL] How to create crude report with psql and/or plpgsql - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: [SQL] How to create crude report with psql and/or plpgsql
Date
Msg-id 3C978469.38387B8C@nsd.ca
Whole thread Raw
In response to Re: SQL statement : list table details  ("Marc Polatschek" <Marc.Polatschek@computec.de>)
Responses Re: [SQL] How to create crude report with psql and/or plpgsql  ("Andrew G. Hammond" <drew@xyzzy.dhs.org>)
Re: [SQL] How to create crude report with psql and/or plpgsql  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [SQL] How to create crude report with psql and/or plpgsql  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Hello Andrew,

I do not need HTML, just plain text or maybe PDF.

It would be nice if there was one extra level for RAISE as in:
RAISE PRINT 'Whatever'
That would not send the message the log but only to the console.
One could do alot with that.

JLL


"Andrew G. Hammond" wrote:
>
> On Tue, Mar 19, 2002 at 01:07:58PM -0500, Jean-Luc Lachance wrote:
>
> > I did not find any kind of print statement in psql or plpgsql.
> > So, how can I create basic report with psql and/or plpgsql?
> > Nothing fancy, page header/footer sub-totals per page.
>
> Errr... psql is a database query tool.  There's not much available
> for doing that kind of thing.  That said, why not just write a
> script to do it:
>
> #!/bin/sh
> echo <<END
> <html><head><title>This is a title</title></head>
> <body>
> <!-- header -->
> END
>
> # do the query
> psql --html --command 'SELECT * FROM foo' my_dbase
>
> echo <<END
> <!-- footer -->
> </body></html>
> END
>

pgsql-general by date:

Previous
From: "Andrew G. Hammond"
Date:
Subject: Re: [SQL] How to create crude report with psql and/or plpgsql
Next
From: Jarosław Jankowski
Date:
Subject: How can I know that record is locked?