Re: Getting a list of tables in a database with Perl
| От | Medi Montaseri |
|---|---|
| Тема | Re: Getting a list of tables in a database with Perl |
| Дата | |
| Msg-id | 3DDAB5F5.20600@intransa.com обсуждение исходный текст |
| Ответ на | Getting a list of tables in a database with Perl (Andrew Magnus <xanadian99@yahoo.com>) |
| Ответы |
Re: Getting a list of tables in a database with Perl
|
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: