Hi Folks

At http://savage.net.au/Perl/list-indexes.pl you can download a demo program.

Comments within the code are:
#       Set DBI_DSN=dbi:mysql:name-of-db
#       or  DBI_DSN=dbi:Pg:dbname=name-of-db
#       Set DBI_USER=a-name
#       Set DBI_PASS=a-password

Give the program 1 table name of an existing database on the command line, where
there are other tables with foreign keys pointing to the primary key of that
table.

Here are my results:
OS: GNU/Linux 2.4.21
Perl: 5.8.0
DBI 1.48
Postgres: 7.4.7
DBD::Pg: 1.42
Primary keys found: 1 (correct)
Foreign keys found: 4 (correct)

OS: WinXP
Perl: 5.8.6
DBI: 1.48
MySQL: 4.1.10
DBD::mysql: 2.9007
Primary keys found: 0 (wrong)
Foreign keys found: 0 (wrong)

Where exactly is the error? I assume in my code (hope not) or in DBD::mysql.

Could readers please run this code on their systems, and post their results
here?

TIA.
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 22/06/2005
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company


Reply via email to