Aggregate function capability with \d in psql

Started by Pascal Polleunusabout 22 years ago2 messagesgeneral
Jump to latest
#1Pascal Polleunus
ppo@beeznest.net

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pascal Polleunus (#1)
Re: Aggregate function capability with \d in psql

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