Re: Trigger Function and Html Output

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Stef Telford" <stef(at)chronozon(dot)artofdns(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Trigger Function and Html Output
Date: 2001-04-02 08:43:35
Message-ID: 018601c0bb55$a91035c0$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: "Stef Telford" <stef(at)chronozon(dot)artofdns(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Edipo Elder Fernandes de Melo 2001-04-02 11:50:32 Calling functions inside a function: behavior
Previous Message Sharmad Naik 2001-04-02 07:22:18 passing parameters between forms