Try this from the command line....
psql -c "\d"
And if you want to bring this into a perl script, try
perl -e '$list = `psql -c "\\d" `; print "$list\n";'
A more readable version is
$list = ` psql -c "\\d" `;
print "$list \n";
Or use DBI and go after pg_tables;
Andrew Magnus wrote:
> I would like to know how I can fetch a list of existing tables in a
> database within a Perl script. Could someone please tell me how this
> can be done, or, at least, a good reference to look it up? Thanks.
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Web Hosting
> <http://rd.yahoo.com/hosting/mailsig/*http://webhosting.yahoo.com> -
> Let the expert host your site