Skip Menu |

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

Report information
The Basics
Id: 38722
Status: new
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: peterdd [...] users.sourceforge.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.09001
Fixed in: (no value)



Subject: sqlt-diagram can't handle PostgreSQL schemas from pg_dump
Hello, I found these db tools and tried to test, but without great success with a PostgreSQL sql dump. I attach a short example of a sqldump produced by pg_dump using pgAdminIII. When executing this with the attached schema: sqlt-diagram -d PostgreSQL mytestschema.sql Error: translate: Error with producer 'SQL::Translator::Producer::Diagram': Can't call method "get_fields" on an undefined value at /usr/local/share/perl/5.8.8/SQL/Translator/Producer/Diagram.pm line 150. When commenting even line 70 in the file out, it completely crashes: sqlt-diagram -d PostgreSQL schema_pg_1table_1sequence.sql gd-png: fatal libpng error: Image width or height is zero in IHDR gd-png error: setjmp returns error condition *** glibc detected *** /usr/bin/perl: double free or corruption (!prev): 0x0903f4e0 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb7dc37cd] /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7dc6e30] /usr/lib/libgd.so.2(gdFree+0x1d)[0xb7a82e7d] /usr/lib/libgd.so.2[0xb7a78ab8] /usr/lib/libgd.so.2(gdDPExtractData+0x6a)[0xb7a78b3a] /usr/lib/libgd.so.2(gdImagePngPtr+0x56)[0xb7a7da36] /usr/lib/perl5/auto/GD/GD.so(XS_GD__Image_png+0x329)[0xb7bb2fa9] /usr/bin/perl(Perl_pp_entersub+0x3ab)[0x80c23cb] /usr/bin/perl(Perl_runops_standard+0x19)[0x80c0d29] /usr/bin/perl(perl_run+0x2ea)[0x806727a] /usr/bin/perl(main+0x112)[0x8063732] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7d71ebc] /usr/bin/perl[0x8063591] ....
Subject: schema_pg_1table_1sequence.sql
-- -- PostgreSQL database dump -- -- Started on 2008-08-26 06:37:52 CEST SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; -- -- TOC entry 1715 (class 0 OID 0) -- Dependencies: 4 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON SCHEMA public IS 'Standard public schema'; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- TOC entry 1286 (class 1259 OID 74414) -- Dependencies: 1632 4 -- Name: meta_database; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE meta_database ( id integer NOT NULL, name character varying(50) DEFAULT ''::character varying NOT NULL, dbtype character varying(20), "connection" character varying(10), host character varying(255), port integer, "user" character varying(32), "password" character varying(255) ); -- -- TOC entry 1285 (class 1259 OID 74412) -- Dependencies: 1286 4 -- Name: meta_database_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE meta_database_id_seq INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -- -- TOC entry 1717 (class 0 OID 0) -- Dependencies: 1285 -- Name: meta_database_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -- I stripped all other tables and stuff for this example ALTER SEQUENCE meta_database_id_seq OWNED BY meta_database.id; ALTER TABLE meta_database ALTER COLUMN id SET DEFAULT nextval('meta_database_id_seq'::regclass);