Hi all,

In a recent project, Im looking for a nice tool that would graph in a
nice picture an entity/relation diagram of a PostgreSQL database, based
on a script (pg_dump --schema-only for example, but not only..)

I found then sqlfairy.

I use a debian sid, up-to-date,
        
$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi

I installed libdbd-pgsql (and every dependance)
  Installed : 0.7.1-3.1
  Candidate : 0.7.1-3.1

I found some problems in using sqlt-tools, since I was unable to find on
the net answers, I finaly report this to you, fellow hackers:

(1) First, some strange things in the documentation
---------------------------------------------------

I had to read /usr/lib/perl5/DBD/Pg.pm to understand that the --dsn
option would need double-quoting this way:

sqlt -f DBI --dsn "dbi:Pg:dbname=mydatabase;host=myservername" \
--db-user dbuser --db-password test -t PostgreSQL > essai.sql

As a PostgreSQL fan, I recognize the PQconnectdb-style of passing
parameters (see
http://www.postgresql.org/docs/8.2/interactive/libpq-connect.html).

The MySQL example given in the perldoc of SQL::Translator::Manual doesnt
 mention this:

  $ sqlt -f DBI --dsn dbi:mysql:FOO --db-user guest \
    --db-password p4ssw0rd -t PostgreSQL > foo


(2) A strange behaviour --from= and -f  dont act the same?
----------------------------------------------------------

[EMAIL PROTECTED]:/tmp$ sqlt-diagram --from=PostgreSQL -o test.png essai
Image written to 'test.png'.  Done.

[EMAIL PROTECTED]:/tmp$ sqlt-diagram -f PostgreSQL -o test.png essai
No db driver specified
Usage:
      ./sqlt-diagram -d|-f|--from|--db=db_parser [options] schema.sql
[...]

-f and --from= aren't suppose to be the same ?


(3) sqlt-diagram doesnt work well and sqlt-graph doesnt work at all...
----------------------------------------------------------------------

... on *my* system I guess... :

[EMAIL PROTECTED]:/tmp$ sqlt-diagram --from=PostgreSQL -o test.png essai
Image written to 'test.png'.  Done.

[EMAIL PROTECTED]:/tmp$ kuickshow test.png

--> I can see 10 tables out of 48 ...


[EMAIL PROTECTED]:/tmp$ sqlt-graph --from=PostgreSQL -o test.png essai
Undefined argument in option spec
Undefined argument in option spec
Undefined argument in option spec

[EMAIL PROTECTED]:/tmp$ sqlt-graph --debug --from=PostgreSQL -o test.png essai
Undefined argument in option spec
Undefined argument in option spec
Undefined argument in option spec


--> I tried many options and stuff, Impossible to know how to use this
tool without
an error!!

--> Im not Perl coder, just user of tools, I read docs (man and perldoc),
    and howtos... no way

Any help welcome !

-- 
Jean-Paul Argudo
www.PostgreSQLFr.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-- 
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to