Re: Very minor feature suggestion

From: "Murphy, Kevin" <MURPHYKE(at)email(dot)chop(dot)edu>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Very minor feature suggestion
Date: 2012-10-23 22:12:12
Message-ID: 090AC30B5193D249B27BDD3B29AC7F7F093805@EXCMBXPW1.chop.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 21, 2012, at 6:02 PM, Peter Eisentraut wrote:
> On Thu, 2012-10-18 at 16:31 +0000, Murphy, Kevin wrote:
>> It might be nice for psql to have a 'htmlcaption' boolean pset option that would wrap the provided title/caption, if any, in a caption tag in the HTML report output, when using html format.
>
> I'm not following. It does do that already

Sorry for not doing due diligence. These aren't the droids I was looking looking for. I'm moving along.

I had tuples_only (which killed the captions) and expanded on, so that the results, which were guaranteed to have a single row, would look nice instead of having a "Record 1" prefix. This is a very special case, and not worth doing anything about, unless it bothers someone that a single row result is prefaced with "Record 1" in expanded mode.

I was doing reports like this:

\pset expanded
\pset footer
\pset format html
\pset tuples_only

\C 'All Samples'
select (select count(distinct blinded_id) from core_person) as "Individuals",
(select count(*) from core_sample) as "Samples",
(select count(distinct uploaded_data_file_id) from core_samplefile) as "Genomic files mapped to a sample/person",
(select count(distinct sample_id) from core_samplefile) as "Samples with genomic files",
(select count(distinct person_id) from core_samplefile join core_sample on core_samplefile.sample_id = core_sample.id) as "Individuals with genomic files",
(select count(distinct person_id) from core_blindfile) as "Individuals with analysis files";

\pset expanded
\pset footer
\pset format aligned
\pset tuples_only

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-10-23 22:12:37 Re: [WIP] pg_ping utility
Previous Message Alvaro Herrera 2012-10-23 21:34:58 Re: Extend argument of OAT_POST_CREATE