Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwOXn-0000ZT-Nj for pgsql-general@arkaria.postgresql.org; Thu, 24 Jun 2021 12:33:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lwOXk-0000Qm-Qs for pgsql-general@arkaria.postgresql.org; Thu, 24 Jun 2021 12:33:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwOXk-0000Qd-EC for pgsql-general@lists.postgresql.org; Thu, 24 Jun 2021 12:33:16 +0000 Received: from mx1.intershop.de ([195.110.60.59]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwOXc-0004nl-I5 for pgsql-general@lists.postgresql.org; Thu, 24 Jun 2021 12:33:15 +0000 Received: from mymail.intershop.de (jenmbs01.ad.intershop.net [10.0.87.121]) by mx1.intershop.de (Postfix) with ESMTPS id 104C8614A1 for ; Thu, 24 Jun 2021 14:33:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intershop.de; s=2017020601; t=1624537984; bh=MzzNGImB4uap+80KwEz8C8RXJBBSStOUMHJStQ12jvw=; h=From:To:Subject:Date:From; b=oBkOS4R17t0MGezzlWZ4ggKwCD387Huatjg6Ye2msQwfS3GEiVs74ZGw6ZkAK2esN 03fl3nqtUcmjksKvl9B4k1/NndLIixYiWhiZnupKiwjPHDM264j6ZM9pDKs2xN6m2P s0oH7QLxnL9dj+4AcHmsi32UoJM8D2FnaQWaWGS//oCWKqKJHJWS4atNAyV93oJO31 bPyFdH0GcOXjICZayRANt3Vi8qKPQ86R8HrkmypjKJKGSoK7wKhtNOIo7UH3dDfIBY 0MAHKEm8O9HTnN7wP3w6GaSwLOg2U3h5cGmLUrIrW3H/1NI87Qvj+Rwu4H7Z0mEk4S WTK4DDbgamKXnf7CGDiQrYiEQKqnyMtBX9tT5YBeNgjRGRm4afKaay0vNi/qYCqIjI rGap4cphQrMfx6AW/Sjy+Nji+lRlXXrcOVNEidDk04R989AePn0+8r0oW6jsDF1v8P tWKW/i9/1xtjRzbpCIF1ZrIEFV4VVyPEuSy1Kp+wAw/0L0GYIm/WjQaqsxfvlhWhNp FtPYZo0CigDLMhBCoV5IfZz00Dvh+55ggUbJ/Rk1Qkmt7xTnPhJPS7ftJe0Dd+sdNw Sph94kTlCFy9Ovp+coXi6KMEphNNYSVsd/ucgYTfE7xum4GCZmh0LkwtsOO3RJ33Hk npJPf3v3t+dPkQpmWMFKnlB4= Received: from JENEX19-1.ad.intershop.net (10.0.87.121) by JENEX19-1.ad.intershop.net (10.0.87.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.12; Thu, 24 Jun 2021 14:33:03 +0200 Received: from JENEX19-1.ad.intershop.net ([fe80::fca3:adda:19c9:b9ff]) by JENEX19-1.ad.intershop.net ([fe80::fca3:adda:19c9:b9ff%13]) with mapi id 15.02.0858.012; Thu, 24 Jun 2021 14:33:03 +0200 From: Marc Mamin To: pgsql-general Subject: removing "serial" from table definitions. Thread-Topic: removing "serial" from table definitions. Thread-Index: Addo89RY852a19hlR0uO2i/ZZ9MRqw== Date: Thu, 24 Jun 2021 12:33:03 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [195.110.60.24] x-tm-snts-smtp: 4F8A7255301EB2439812911D312DE4D7F49353939C3444EBC656DA00475E125B2000:8 Content-Type: multipart/alternative; boundary="_000_feaeb83188034e9e88fcaeb33225b22cintershopde_" MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.2 at mx1.intershop.de X-Virus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_feaeb83188034e9e88fcaeb33225b22cintershopde_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Is there a way to change a data type from serial to int? I tried with : ALTER TABLE "admin".db_jobs ALTER COLUMN id TYPE int USING id::int; But this seems not to change anything, as if Posgres woud consider the stat= ement as a no-op. My problem is that "serial" is not exported with pg_dump. Creating a db from the dump will hence result into a different table defini= tion (which is equivalent tough) We are trying a transfer/migration tool on Azure, that check the table defi= nitions between the source and target before starting the data transfer, an= d it blocks on that difference. best regards, Marc Mamin --_000_feaeb83188034e9e88fcaeb33225b22cintershopde_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

Is there  a way to = change a data type from serial to int?

I tried with :

  ALTER TABLE "= ;admin".db_jobs ALTER COLUMN id TYPE int USING id::int;

But this seems not to ch= ange anything, as if Posgres woud consider the statement as a no-op.

 =

My problem is that "= ;serial" is not exported with pg_dump.

Creating a db from the d= ump will hence result into a different table definition (which is equivalent tough)

 =

We are trying a transfer= /migration tool on Azure, that check the table definitions between the source and target before starting the data transfer, and it bl= ocks on that difference.

 =

best regards,=

Marc Mamin

 

--_000_feaeb83188034e9e88fcaeb33225b22cintershopde_--