Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDsPy-0002zC-As for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Mar 2020 16:16:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDsPx-0003Zz-1h for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Mar 2020 16:16:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDs62-0007GD-7w for pgsql-bugs@lists.postgresql.org; Mon, 16 Mar 2020 15:56:06 +0000 Received: from p3plsmtpa09-03.prod.phx3.secureserver.net ([173.201.193.232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDs5z-0001VP-06 for pgsql-bugs@lists.postgresql.org; Mon, 16 Mar 2020 15:56:04 +0000 Received: from Umer ([39.61.57.63]) by :SMTPAUTH: with ESMTPSA id Ds5tjudHmRghTDs5wj0RuM; Mon, 16 Mar 2020 08:56:01 -0700 X-CMAE-Analysis: v=2.3 cv=Irpgj43g c=1 sm=1 tr=0 a=SMNf3yd81I2lTehxuZwzHQ==:117 a=SMNf3yd81I2lTehxuZwzHQ==:17 a=DAwyPP_o2Byb1YXLmDAA:9 a=Oh5WT-IyZjz9fvww0OQA:9 a=CjuIK1q_8ugA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=iejPJFFpHTY_iYY3aWYA:9 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-SECURESERVER-ACCT: nafees@epazz.net From: "Nafees Sardar" To: Subject: Duplicate key value violates unique constraint Date: Mon, 16 Mar 2020 20:55:57 +0500 Message-ID: <000c01d5fbab$63da7be0$2b8f73a0$@epazz.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01D5FBD5.4CB27FB0" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdX7q07afkcK1bH2RF+u3E3P5qpCzw== Content-Language: en-us X-CMAE-Envelope: MS4wfGIJ1pP/x7zA/pYgxbZ+omXSf4eyjld7A9Y0Jb9vSREfDotSPUzKCEGBeXQMVhP3sbswWw9/Fmuy3bv74SZWOIJsarMwfZnnP1z4st47CRNnFdQsYNL3 /2aGfCR2x86Kh7uTn6g+WrY+jDtjUSGERioMZGzyZRnqMVIdTOqYIWkS List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_000D_01D5FBD5.4CB27FB0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi support, I migrate my data from MS Sql server to postgreSQL database, now when I try to insert new row it gives me error "duplicate key value violates unique constraint". For example I have a table which contains 100 rows of records when I go for inserting 101 row it give duplicate value constraint error. When I pass PK value manually its working, and one more thing auto increment is enabled for all tables . Can you please let me know anything I am missing? I will really appreciate it. Thanks Regards Nafees Sardar ------=_NextPart_000_000D_01D5FBD5.4CB27FB0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi support,

 

I migrate my = data from MS Sql server to postgreSQL database, now when I try to insert = new row it gives me error “duplicate key value violates unique = constraint”. For example I have a table which contains 100 rows of = records when I go for inserting 101 row it give duplicate value = constraint error. When I pass PK value manually its working, and one = more thing auto increment is enabled for all tables .

 

Can you = please let me know anything I am missing?  I will really appreciate = it.

 

Thanks

Regards

Nafees = Sardar

------=_NextPart_000_000D_01D5FBD5.4CB27FB0--