You can either assume that they are all listed in geometry_columns or geography_columns. Or you can do a more complicated query to include other tables than in geometry/geography, (this is from QGIS code[1]):<div><br></div>

<div><div><div>select f_table_name, f_table_schema, upper(type), pg_class.relkind</div><div>from geometry_columns, pg_class, pg_namespace</div><div>where relname=f_table_name</div><div>    and f_table_schema=nspname</div>

<div>    and pg_namespace.oid=pg_class.relnamespace</div><div>    and has_schema_privilege(pg_namespace.nspname,'usage')</div><div>    and has_table_privilege('"'||pg_namespace.nspname||'"."'||pg_class.relname||'"','select')</div>

<div>order by f_table_schema,f_table_name;</div></div></div><div><br></div><div>To search geography, replace "geometry_columns" with "geography_columns". Geography column support is new in QGIS, and is only in trunk at the moment.</div>

<div><br></div><div>[1] <a href="https://trac.osgeo.org/qgis/browser/trunk/qgis/src/app/postgres/qgspgsourceselect.cpp?rev=13922#L632">https://trac.osgeo.org/qgis/browser/trunk/qgis/src/app/postgres/qgspgsourceselect.cpp?rev=13922#L632</a><br>

<br></div><div>-Mike</div><div><br><div class="gmail_quote">On 29 July 2010 05:57, venkat <span dir="ltr"><<a href="mailto:ven.tammineni@gmail.com">ven.tammineni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<font color="#3366ff">Dear All,</font><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"><br></font></div><div><font color="#3366ff">   How can i retrieve  only spatial enabled tables form the database(Postgresql/PostGIS).Please let me know. </font></div>


<div><font color="#3366ff"><br></font></div><div><font color="#3366ff">I am waiting for your great response.</font></div><div><font color="#3366ff"><br></font></div><div><font color="#3366ff">Thanks and Regards,</font></div>


<div><font color="#3366ff"><br></font></div><font color="#888888"><div><font color="#3366ff">Venkat</font></div>
</font><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>