Search Postgresql Archives

Re: Psql command for rowcount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2008 at 3:19 PM, Markova, Nina <nmarkova@xxxxxxxxxxx> wrote:
> Is there a psql or other command that I can use to list tables and their
> rows? All I found is this:
> http://archives.postgresql.org/pgsql-hackers/2004-09/msg00876.php

select tablename,reltuples from pg_class inner join pg_tables on
tablename=relname where tablename !~* 'pg_*' and tablename !~*
'sql_*';

Remember that the reltuples count is an *estimate* and won't be 100%
an accurate- only a count(*) will get you that.

-- 
- David T. Wilson
david.t.wilson@xxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux