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

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
Thread:
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

Browse pgsql-in-general by date

  From Date Subject
Next Message Prashanth Reddy 2017-07-18 01:27:22 Steps to place standby database in read write
Previous Message Shirley Wang 2017-05-17 19:14:59 Call for users to talk about table partitioning