Skip Menu |

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 3304
Status: resolved
Worked: 4 hours (240 min)
Priority: 0/
Queue: SQL-Translator

People
Owner: kclark [...] cpan.org
Requestors: bronto [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: Cannot convert PostgreSQL to image
Distribution name and version: CPAN distribution, version 0.02 # $Id: Translator.pm,v 1.32 2003/06/18 17:15:38 kycl4rk Exp $ Perl version: This is perl, v5.8.0 built for i386-linux-thread-multi Operating system vendor and version: Debian GNU/Linux distribution, "testing" version Linux brabham 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686 GNU/Linux sqlt-{diagram,graph}.pl fail to convert this PostgreSQL code: CREATE TABLE PEOPLE ( id serial PRIMARY KEY, nick varchar(16) UNIQUE NOT NULL, passwd varchar(14) NOT NULL, name varchar(64), surname varchar(64) NOT NULL, email varchar(96) UNIQUE NOT NULL ) ; CREATE TABLE GROUPS ( id serial PRIMARY KEY, name varchar(32) UNIQUE NOT NULL, deflevel smallint DEFAULT 15 ) ; CREATE TABLE PG ( groupID integer REFERENCES GROUPS (id), userID integer REFERENCES PEOPLE (id), level smallint, CHECK (level BETWEEN 0 AND 32) ) ; CREATE TABLE TYPES ( id serial PRIMARY KEY, descr varchar(64) UNIQUE NOT NULL, mime varchar(96) DEFAULT 'application/octet-stream' NOT NULL ) ; CREATE TABLE STATUSES ( id serial PRIMARY KEY, descr varchar(64) UNIQUE NOT NULL ) ; CREATE TABLE DOCUMENTS ( id serial PRIMARY KEY, title varchar(255) NOT NULL, type integer REFERENCES TYPES (id), published date NOT NULL, updated date NOT NULL, descr varchar(200), url varchar(128) UNIQUE NOT NULL, status integer REFERENCES STATUSES (id) ) ; CREATE TABLE AUTHORS ( id serial PRIMARY KEY, name varchar(128) UNIQUE NOT NULL ) ; CREATE TABLE AD ( authorID integer REFERENCES AUTHORS (id), docID integer REFERENCES DOCUMENTS (id) ) ; CREATE TABLE SECTIONS ( id serial PRIMARY KEY, descr varchar(64) UNIQUE NOT NULL ) ; CREATE TABLE SD ( sectionID integer REFERENCES SECTIONS (id), docID integer REFERENCES DOCUMENTS (id) ) ; CREATE TABLE ACCESS_LIST ( groupID integer REFERENCES GROUPS (id), level smallint, docID integer REFERENCES DOCUMENTS (id), CHECK (level BETWEEN 0 AND 32) ) ; The resulting image is attached. No errors are shown. Ciao --bronto
Download grafico.png
image/png 1.3k
grafico.png
RT-Send-CC: sqlfairy-developers [...] lists.sourceforge.net
There was a problem with parsing the "CHECK" constraint. This uncovered other deeper problems in the Schema objects. This has now been fixed in the latest CVS version available from Sourceforge through the website: http://sqlfairy.sourceforge.net/ Remember that anonymous CVS runs at least 24 hours behind the developer's CVS, so the changes may not be available until tomorrow. Thanks for the report. I'm attaching what the Diagram producer made of it. The GraphViz output is pretty good, too. ky
Download pg.png
image/png 10.6k
pg.png