Re: proposal - psql - show longest tables

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - psql - show longest tables
Date: 2013-07-22 21:44:59
Message-ID: m2a9lei810.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> SELECT * from top5();

$ TABLE top5; -- add a view on top of the SRF

> you cannot use parameters - then I have to have prepared files like
> top10, top20, ... what is not too friendly

The SRF could be using custom GUCs so that you can parametrize it, or
just even classic parameters…

$ TABLE top(5); -- needs a patch to accept SRF here…
$ TABLE top LIMIT 5;

$ SET top.limit = 5;
$ TABLE top;

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Natalie Wenz 2013-07-22 21:47:21 Re: Insert result does not match record count
Previous Message David E. Wheeler 2013-07-22 21:39:35 Comma Comma Comma 8601