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 1oyTPo-0004JD-On for pgsql-admin@arkaria.postgresql.org; Fri, 25 Nov 2022 07:46:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oyTPn-0007Eu-Lb for pgsql-admin@arkaria.postgresql.org; Fri, 25 Nov 2022 07:46:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oyTPn-0007El-Ag for pgsql-admin@lists.postgresql.org; Fri, 25 Nov 2022 07:46:27 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oyTPl-0001s4-4H for pgsql-admin@lists.postgresql.org; Fri, 25 Nov 2022 07:46:26 +0000 Received: by mail-wm1-x32b.google.com with SMTP id o7-20020a05600c510700b003cffc0b3374so2789500wms.0 for ; Thu, 24 Nov 2022 23:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ybfRL+qeh5Tl/shHLjPogskddh69taP7tg0s9/FgnMo=; b=HKOCa2ZWIEbVLZPhzvmLZkYFkXVZxK7ruMmRTRMymXjpu4OwCBA8bFKoWn0jKQN6e/ zl3/oSgT7OetlGNhfRS8UTSG7JddiHmeIYQUsWkx7OPMEKJ54lt9i90VZy/1mMiNGDWy S/echq4d+oCCPzEYc3OAZ1pB5V471gsvLMkCorcB/cazFFEBm9fvUzkWH4056RVYuVc5 Y6WN0hTqs+tsltFhJlKb41m5vggiWxcUaJbHPJx4OC6Z1ym30/yFrOI2tmiypTh1tMKA JQxsnOLJkzyrlIeHSUOvil8MfdpwmZ735Jqawz0nuqpmA5ssjXI0+hhM/WrbDnirdhr1 kUyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ybfRL+qeh5Tl/shHLjPogskddh69taP7tg0s9/FgnMo=; b=TKzInTVhs+QcbBAiDyMO0RQx9fu6Xl7irKTQvza6RLz2/IIs1Rl2EyGfwsT3BU4tGT jlT0lyfJBTB/TlpyhIwjAEbXFTEUdDzsNnQ0fqD+OnPz3BGP8rsebiG4szOKVhsCO9la LAj7W8uR+/vspiXAnVAHkTURLnzGFB3wk+2qC9jQz/6m1AoXU7xcq/5ls9+yiXf9RX82 JMFWHhxKl239L3U1lv+BbD70hCmYlv/gM13LtdAZoLbWO8Qie4b0q1oeQ8rPx25cKlah cBouS0VsTcTZxLhYlEQNGcVLATttGgieBmlmpo+UlwcXvur5Ox7LUg2djR8IIQeZg2ys zWCQ== X-Gm-Message-State: ANoB5pnc94LWpN+U83Sq8cmLKKuf1SUdoQYtNu2ipT2rZz0pla/VLAyS 3pj4oQLrYUqYveb0mjr+10OzPLpDAEQZFw== X-Google-Smtp-Source: AA0mqf6fu+AlWx7Jx04AZM8tRWajdtKC60eIT37F7vo6j+iyvmauJvlXV62Wi9g76Cxiy+2tOFMGkA== X-Received: by 2002:a05:600c:246:b0:3cf:760a:fbaf with SMTP id 6-20020a05600c024600b003cf760afbafmr14065689wmj.110.1669362383590; Thu, 24 Nov 2022 23:46:23 -0800 (PST) Received: from localhost.localdomain (mobiledyn-62-240-134-189.mrsn.at. [62.240.134.189]) by smtp.gmail.com with ESMTPSA id w13-20020adfec4d000000b00241dd5de644sm3025120wrn.97.2022.11.24.23.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 23:46:23 -0800 (PST) Message-ID: <41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at> Subject: Re: Disable unique constraint in Postgres From: Laurenz Albe To: Nikhil Ingale , pgsql-admin@lists.postgresql.org Date: Fri, 25 Nov 2022 08:46:22 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2022-11-25 at 12:48 +0530, Nikhil Ingale wrote: > We have an alter command to disable any constraints in the oracle db. Similarly do we have any > command to disable the UNIQUE constraint in postgres. Most of the postgres db forum suggests > dropping the UNIQUE constraint. But, I don't want to drop the constraint here instead just > disable the unique constraint. > > Need your inputs on the same. The db forums were right: you cannot disable a unique constraint in PostgreSQL. Yours, Laurenz Albe