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

Owner: Nobody in particular
Requestors: peterdd [...]

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

Subject: sqlt-diagram can't handle PostgreSQL schemas from pg_dump
Download (untitled) / with headers
text/plain 1.4k
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/ 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/[0xb7dc37cd] /lib/tls/i686/cmov/[0xb7dc6e30] /usr/lib/[0xb7a82e7d] /usr/lib/[0xb7a78ab8] /usr/lib/[0xb7a78b3a] /usr/lib/[0xb7a7da36] /usr/lib/perl5/auto/GD/[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/[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; ALTER TABLE meta_database ALTER COLUMN id SET DEFAULT nextval('meta_database_id_seq'::regclass);

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to