Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D8A969FA5CE for ; Sun, 15 Oct 2006 10:55:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 24758-10 for ; Sun, 15 Oct 2006 10:55:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.greatgulfhomes.com (mail.greatgulfhomes.com [216.191.52.66]) by postgresql.org (Postfix) with ESMTP id 934709FA4EF for ; Sun, 15 Oct 2006 10:55:15 -0300 (ADT) Received: from [10.243.102.72] ([216.191.52.74]) (authenticated bits=0) by mail.greatgulfhomes.com (8.12.8/8.12.8) with ESMTP id k9FDt9Q5028113; Sun, 15 Oct 2006 09:55:10 -0400 Message-ID: <45323DA5.1080601@ashtonwoodshomes.com> Date: Sun, 15 Oct 2006 09:54:45 -0400 From: Terry Fielder User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Kenneth Gonsalves CC: pgsql-sql@postgresql.org Subject: Re: migrating numeric to serial from MSSQL to postgres References: <56210BFF-763D-4FC2-AA43-D514C19DB37F@thenilgiris.com> In-Reply-To: <56210BFF-763D-4FC2-AA43-D514C19DB37F@thenilgiris.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.328 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/141 X-Sequence-Number: 26530 I believe: IDENTITY(1, 1) just means "Primary Key" in M$SQL numeric 18,0 means a numeric field of zero decimal points. Hence we are looking at a 18 byte integer. bigint is not big enough, so probably should use the same in numeric 18,0 in postgres There may be a way to get MSSQL to dump a SQL compliant dump, which would make a migration to postgres much easier if your schema is large. Without a SQL compliant dump, you have a lot of cleaning up/tweaking the dump to make it readable by Postgres (but that's what I have done the few times in the past I have had to do that, fortunately not for many statements :) Terry Fielder terry@greatgulfhomes.com Associate Director Software Development and Deployment Great Gulf Homes / Ashton Woods Homes Fax: (416) 441-9085 Kenneth Gonsalves wrote: > hi, > > am migrating a database from MSSQL to postgres. How would i migrate this: > > [Id] [numerc](18, 0) IDENTITY (1, 1) > > -- > regards > kg > http://lawgon.livejournal.com > http://nrcfosshelpline.in/web/ > > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match >