Start a new topic

PostgreSQl DDL Error

[This topic is migrated from our old forums. The original author name has been removed]

Hi, didn't find this problem in the forum: I tried to get the ddl description of a PostgreSQL table and got the following error: An error occurred while executing the database request for: PostgreSQL 8.3.9 PostgreSQL Native Driver PostgreSQL 8.4 JDBC3 (build 701) Short message: An error occurred while performing the operation: Index: 47, Size: 46 Long Message: Index: 47, Size: 46 Details:    Type: java.lang.IndexOutOfBoundsException Stack Trace: java.lang.IndexOutOfBoundsException: Index: 47, Size: 46 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.onseven.dbvis.W.A.H.ą(Z:3541) at com.onseven.dbvis.f.F.B.F.ā(Z:2231) at com.onseven.dbvis.f.B.A.B$A.execute(Z:804) at com.onseven.dbvis.G.B.X.ƫ(Z:591) at com.onseven.dbvis.G.B.J.ā(Z:1013) at se.pureit.swing.A.O$2.run(Z:1192) at java.lang.Thread.run(Unknown Source) System Information: Product: DbVisualizer Personal 7.1.1 Build: #1578 (2010/06/23 11:20) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_20 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 This happens only for one table for the ddl, the other details work fine and all the other tables ddl descriptions are ok! Any ideas why? Thx in advance, Gert

[This reply is migrated from our old forums.]

Re: PostgreSQl DDL Error
Hi Gert, Thanks for reporting this. Can you please send the DDL for this table to support@dbvis.com or post it here to help us figure out what is wrong? Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: PostgreSQl DDL Error
Hi Hans because I didn't create the table, I had to use pgAdmin to get the ddl: CREATE TABLE booking ( id bigserial NOT NULL, "owner" character varying(45), service_agency_no character varying(45), service_agency_owner character varying(50), booking_no character varying(45), booking_block_no character varying(45), booking_date_from date DEFAULT '0001-01-01'::date, booking_date_till date DEFAULT '0001-01-01'::date, booking_price numeric(20,8) DEFAULT 0.0, booking_collection_type character varying(4), booking_cancelation_fee numeric(20,8), deposit numeric(20,8), booking_confirmation_type character varying(45), booking_confirmation_type_text character varying(45), iso_country character varying(10), iso_language character varying(10), iso_currency character varying(10), file_name character varying(245), parser_state boolean DEFAULT false, line_number character varying(45), crs_tourop_code character varying(45), crs_tourop_code_context character varying(45), crs_name character varying(45), crs_agency_no character varying(45), crs_location_no character varying(45), crs_terminal_no character varying(45), crs_expi_no character varying(45), crs_expi_code character varying(45), crs_consultant_code character varying(45), notice text, edit_time timestamp without time zone DEFAULT now(), booking_message_code character varying(10), booking_message_text character varying(100), booking_timestamp timestamp without time zone, booking_file_id bigint, manual_change boolean DEFAULT false, crs_match_id bigint, booking_status text, booking_no_from_ibe character varying(100), booking_cancellation_by character varying(25), booking_action_code character varying(10), crs_payment_type character varying(20), service_quantity smallint, imported_db1 boolean DEFAULT false, imported_db2 boolean DEFAULT false, booking_spnr_no character varying(45), CONSTRAINT booking_pkey PRIMARY KEY (id) ) WITH (OIDS=FALSE); ALTER TABLE booking OWNER TO postgres; GRANT ALL ON TABLE booking TO postgres; GRANT SELECT ON TABLE booking TO reader; --several comments: COMMENT ON COLUMN booking."owner" IS 'This is ....'; COMMENT ON COLUMN booking.service_agency_no IS 'This is ...'; -- Index: booking_booking_no_idx -- DROP INDEX booking_booking_no_idx; CREATE INDEX booking_booking_no_idx ON booking USING btree (booking_no); -- Index: booking_crs_agency_idx -- DROP INDEX booking_crs_agency_idx; CREATE INDEX booking_crs_agency_idx ON booking USING btree (crs_agency_no); -- Index: booking_crs_kind_id_idx -- DROP INDEX booking_crs_kind_id_idx; CREATE INDEX booking_crs_kind_id_idx ON booking USING btree (crs_match_id); -- Index: booking_crs_tourop_code_idx -- DROP INDEX booking_crs_tourop_code_idx; CREATE INDEX booking_crs_tourop_code_idx ON booking USING btree (crs_tourop_code); -- Index: booking_date_from_idx -- DROP INDEX booking_date_from_idx; CREATE INDEX booking_date_from_idx ON booking USING btree (booking_date_from); -- Index: booking_edit_time_date_idx -- DROP INDEX booking_edit_time_date_idx; CREATE INDEX booking_edit_time_date_idx ON booking USING btree ((edit_time::date)); -- Index: booking_edit_time_idx -- DROP INDEX booking_edit_time_idx; CREATE INDEX booking_edit_time_idx ON booking USING btree (edit_time); -- Index: booking_pattern_booking_no_idx -- DROP INDEX booking_pattern_booking_no_idx; CREATE INDEX booking_pattern_booking_no_idx ON booking USING btree ((booking_no::text) varchar_pattern_ops); -- Index: booking_pattern_crs_agency_idx -- DROP INDEX booking_pattern_crs_agency_idx; CREATE INDEX booking_pattern_crs_agency_idx ON booking USING btree ((crs_agency_no::text) varchar_pattern_ops); -- Index: booking_timestamp_idx -- DROP INDEX booking_timestamp_idx; CREATE INDEX booking_timestamp_idx ON booking USING btree (booking_timestamp); -- Trigger: booking_remove_leading_zero on booking -- DROP TRIGGER booking_remove_leading_zero ON booking; CREATE TRIGGER booking_remove_leading_zero BEFORE INSERT OR UPDATE ON booking FOR EACH ROW EXECUTE PROCEDURE replace_first_zero(); Maybe there's an eror in the ddl, I'll check it. Many thx in advance for Your support, Gert Edited by: Gert Matern on 26.07.2010 10:21
[This reply is migrated from our old forums.]

Re: PostgreSQl DDL Error
Hi Gert, Thanks for the DDL. Unfortunately, I cannot reproduce the error. The stack trace, however, shows that the problem is related extracting column comments. Can you please run this SQL and post or send us the result? SELECT d.description, d.objsubid FROM pg_catalog.pg_description d, pg_catalog.pg_class c, pg_catalog.pg_namespace n WHERE d.objoid = c.oid AND c.relnamespace = n.oid AND d.objsubid != 0 AND c.relname = 'booking' AND n.nspname = '' where is replaced with the name of the schema the table belongs to. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: PostgreSQl DDL Error
Hi, This is now fixed in the DbVisualizer 7.1.2 version. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: PostgreSQl DDL Error
That's what I call service, you are listening to Your customers! It's working now without problems, thx!!!