Thread: Aggregate function capability with \d in psql

Aggregate function capability with \d in psql

From
Pascal Polleunus
Date:
Hi,

Is there an *easy* way to display a list of tables with their number of
input values in psql ?

Wouldn't it be useful to have the ability to execute aggregate functions
with the \d command ?

Currently (psql 7.4.1):
   \d [NAME]      describe table, index, sequence, or view
   \d{t|i|s|v|S} [PATTERN] (add "+" for more detail)
                  list tables/indexes/sequences/views/system tables

Adding for example:
   \d{t|S|v} [PATTERN] [-exec COMMAND] (add "+" for more detail)
                  list tables/views/system tables
                  with the result of the aggregate command

And extending the concept to:
   \ds [PATTERN] [-exec {curr|next|min|max}]


Thanks,
Pascal


Re: Aggregate function capability with \d in psql

From
Tom Lane
Date:
Pascal Polleunus <ppo@beeznest.net> writes:
> Wouldn't it be useful to have the ability to execute aggregate functions
> with the \d command ?

Use the information_schema if you want to write queries about this
information.

            regards, tom lane