but it throws me an error as it expects the argument and not the column name. And if i put quotes like this :
'tablename' becomes the relation name and not the column of pg_tables which again throws an error that "relation tablename does not exist.
I want to do something like this in postgres as i can do in oracle:
SELECT( ((SUM ( BYTES))/1024)/1024)/1024 AS size_gb FROM DBA_SEGMENTS WHERE SEGMENT_NAME IN ('table1','table2','table3','table4','table5') AND OWNER = 'my_schema';
Is it possible?
Also by count of tables I mean is there a table in postgres which gives the total count of rows in all tables?
Is this ok to use:
ORDER BY n_live_tup DESC;