Re: How do you find the row count for all your tables in Postgres? - Mailing list pgsql-general

From Michael Paquier
Subject Re: How do you find the row count for all your tables in Postgres?
Date
Msg-id CAB7nPqRWj1VX49hULXxr_g=g+PxtAPBgGBPZz6gDcer2ZxgAgw@mail.gmail.com
Whole thread Raw
In response to How do you find the row count for all your tables in Postgres?  (Nithya Soman <nithya@quintetsolutions.com>)
List pgsql-general
On Mon, Apr 7, 2014 at 6:46 PM, Nithya Soman
<nithya@quintetsolutions.com> wrote:
> How can we find the total row count for all db tables in psql version  7.4.3
> ??
Are you aware that 7.4 is EOL for 5 years? 7.4.3 is missing as well at
least 4 years of bug fixes in its stable branch.

> The query which worked fine in psql 9.2 version is :
> SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables ORDER BY
> n_live_tup DESC.
> But same query throws error as 'ERROR:  column "n_live_tup" does not exist'
> in psql 7.4.30. Could you please provide a valid query to get row count for
> all db tables in psql  7.4.3 ?
The documentation of 7.4 does not mention explicitely what are the
columns of this view, but connecting to a 7.4 server and issuing "¥d
pg_stat_user_tables" would help and you might be able to get an
equivalent of what you are trying to do.
--
Michael


pgsql-general by date:

Previous
From: Rebecca Clarke
Date:
Subject: Re: Initial queries of day slow
Next
From: Stefan Keller
Date:
Subject: Re: Postgres as In-Memory Database?