Query : "SELECT reltuples FROM pg_class WHERE oid = 'schema_name.table_name'::regclass;"

Lists: pgsql-in-general
From: Patel Akash <patelakash20(at)gmail(dot)com>
To: pgsql-in-general(at)postgresql(dot)org
Subject: Query : "SELECT reltuples FROM pg_class WHERE oid = 'schema_name.table_name'::regclass;"
Date: 2017-07-10 10:12:36
Message-ID: CADD9ygK5ZyqOg9yaKMvmx0YKc1ezTYo_VqOL97Noiieo7s7rbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-in-general

Hi Team,

I am in a situation where I am executing above mentioned query on postgres
DB [via commandline], and I am also getting a number of rows of the
perticular table.

but when I try to execute mentioned query in Java, resultset always give
row count as '0' instead of actual one.

Any idea, what's going wrong and where?

Thanks,
Akash