Oracle_PGS_Schemas1.htm
Schemas :

Oracle: A schema is equivalent to an user account:

PostgreSQL: A schema is an Object in a database. One data base can have many schemas. Schemas contain , tables, data types, functions operators. A PostgreSQL database cluster contains one or more databases, and the users shares the cluster.

Oracle Schema : (User account)

Script:SELECT table_name FROM all_tables WHERE owner ='SCOTT'

 This one took for ever : my  purpose was to query one user or schema like "SCOTT'. , could be accomplished with the above. Please note that  used PHP programming language.

Below includes all the owner accounts.

select owner, table_name from all_tables

 
Post GreSQL

PostgreSQL

SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_schema,table_name

Using following PHP script for a DB pgsdemo1

<?php
$host = "localhost";
$user = "postgres";
$pass = "postgre_manas9";
$db = "pgsdemo1";
 

?>

Querying with PHP application: (Note total rows:  117 )

The same query with default user ( postgre) using pgaAdmin.exe, with enterprise manager where default user "postgres" had access to other objects,

SELECT table_schema,table_name FROM information_schema.tables ORDER BY table_schema,table_name