Re: Patch file for table drop on import

From: John McCawley <jmccawley(at)worleyco(dot)com>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Patch file for table drop on import
Date: 2002-06-12 16:41:13
Message-ID: 3D0779A9.2030607@worleyco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers


>An attachment to the list would be great thanks.
>
>
Attached is a patch for frmWizard.frm in the pgMigration project. It
implements the following:

1) Adds a checkbox to the wizard for "Drop any existing destination tables"
2) If this box is checked, it uses the schema object to determine the
existance of the imported table in the destination Postgres DB, and adds
a drop table statement before the create table statement
3) Minor modification to the existing MS Access autonumber code to allow
me to reuse it for MS SQL
3) If the source DB type is MS SQL, it runs a query on the source
database to find the autonumber field, if found it sets variables to
allow the existing autonumber code to add the sequence
4) If the "drop existing" checkbox is checked, it will drop existing
sequence names that conflict with the ones that are being created
5) Added text to the status window to notify user of dropped tables, and
created and dropped sequences.

NOTE: Due to an apparent name length limitation in the schema object, I
was only able to compare up to 31 characters of the destination sequence
name. If the first 31 characters match, I assume it to have the same name

NOTE: The SQL Server autonumber query has only been tested on SQL Server
7.0. I am unable to test its validity in 6.5 or SQL Server 2000.

John

Attachment Content-Type Size
frmWizard_jmccawley_6_11_2002.patch text/plain 15.7 KB

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2002-06-13 07:15:07 Re: [pgadmin-support] "Invisible" relations after migrating Access
Previous Message Vergoz Michael 2002-06-12 09:47:03 SPI