From: Richard Huxton <dev@archonet.com>
To: Stef Telford <stef@chronozon.artofdns.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Trigger Function and Html Output
Date: Mon, 2 Apr 2001 09:43:35 +0100
Message-ID: <018601c0bb55$a91035c0$1001a8c0@archonet.com> (raw)
References: <01040103502000.12630@devil.hades>
<3AC758D6.41FDD33C@archonet.com>
<01040113214300.13105@devil.hades>
From: "Stef Telford" <stef@chronozon.artofdns.com>
> Richard Huxton wrote:
>
> Each select works on a view, rather than hardcode the view into the
> perl CGI, i would rather have the table header/column titles returned
> as the first item as text/html (i know about the func procedure to get the
> table_attributes) and then all the formatting thereafter done by the
database
> for each row.
>
> maybe i am naive in thinking this way, but surely the a database function
> formatting the returned string must be quicker then perl. (speaking
> generically of course, i conceed that there are times when the reverse
> is true)
Not sure you'd notice much of a speed difference - in most cases other
overheads will be the deciding factor. Of course, YMMV.
> thank you for the input, and if i was jst starting out i would agree with
> you. I cant really explain it any better than i have previously, but
> hopefully you will see that i want to use the database to do this.
>
> hopefully that isnt that strange a request ;)
Strange or not, it's your database and you're the only one in a position to
make this sort of decision.
I did think that it was the psql front-end that did the HTML stuff. But -
there seems to be html stuff in fe-print.c (src/interfaces/libpq) and the
Perl module Pg has html output options in $result->print(...) which might be
flexible enough for your needs.
I must admit I've never used it, so I don't know if you can add attributes
to table elements, use styles etc.
HTH
- Richard Huxton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, stef@chronozon.artofdns.com
Subject: Re: Trigger Function and Html Output
In-Reply-To: <018601c0bb55$a91035c0$1001a8c0@archonet.com>
References: <01040103502000.12630@devil.hades> <3AC758D6.41FDD33C@archonet.com> <01040113214300.13105@devil.hades> <018601c0bb55$a91035c0$1001a8c0@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox