Re: Printable report generation

From: will trillich <will(at)serensoft(dot)com>
To: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Printable report generation
Date: 2001-08-22 17:14:41
Message-ID: 20010822121441.A15403@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 21, 2001 at 10:25:35AM +0200, Tony Grant wrote:
>
> > > For example, say I've got a postgresql database of client information
> > > (names, addresses, etc.), and I want to use this information to generate
> > > envelopes for mailouts. As far as my understanding goes, such
> > > functionality is not provided by postgresql itself.
>
> I have the same problem but I need a guide on JDBC serialization. I
> would like to put a button on a JSP that will save the result of a query
> to local disk as a tab delimited file.
>
> That will permit me to open it in AppleWorks for mailing label printing.
>
> Any pointers greatly appreciated

db=# \h copy
Command: COPY
Description: Copies data between files and tables
Syntax:
COPY [ BINARY ] table [ WITH OIDS ]
FROM { 'filename' | stdin }
[ [USING] DELIMITERS 'delimiter' ]
[ WITH NULL AS 'null string' ]
COPY [ BINARY ] table [ WITH OIDS ]
TO { 'filename' | stdout }
[ [USING] DELIMITERS 'delimiter' ]
[ WITH NULL AS 'null string' ]

db=# copy someTable to '/path/to/file.tsv';

now read tab-separated file "file.tsv" into the program of your
choice.

or use "practical extraction and reporting language" to generate
your reports (perl!)...

--
Khan said that revenge is a dish best served cold. I think
sometimes it's best served hot, chunky, and foaming.
- P.J.Lee ('79-'80)

will(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-08-22 17:32:09 Re: DBI placeholders
Previous Message Peter Eisentraut 2001-08-22 16:12:58 Re: During dump: function not found