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 1l1WeI-0007yR-JL for pgsql-admin@arkaria.postgresql.org; Mon, 18 Jan 2021 15:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1WeH-0000UY-GD for pgsql-admin@arkaria.postgresql.org; Mon, 18 Jan 2021 15:40:57 +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 1l1WeH-0000UL-6m for pgsql-admin@lists.postgresql.org; Mon, 18 Jan 2021 15:40:57 +0000 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l1WeE-0003Jf-Ey for pgsql-admin@lists.postgresql.org; Mon, 18 Jan 2021 15:40:56 +0000 Received: by mail-qv1-xf2b.google.com with SMTP id s6so7658631qvn.6 for ; Mon, 18 Jan 2021 07:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:message-id:in-reply-to:subject:mime-version; bh=5F/6ppGf5f5RC21lv2DWiM0Qg2IFl3ywhNDlAioXIzc=; b=D1NfcTB5UMh2DyghfF8sxEcc3KXl9jmxu4Sx1dJ5M+Ln0tiGswJKka1KthY5R1G3ZU 3QVPi41SjzFpdkLtkbNSVudjJOQf8HHWllVcN9jzy93dBSqXTeL/esByMnFLvMu78x3c tBR/EuNtWsAhbZCspONH2anf6o31mmBGqowWuBEPo0iOEZeQIouWMDuyT87pKawT/tmP hX9Wp5UgP256L6vayhozp8COHqX79l3ULzHYcPLxgS26JisiEWPiH5RiqyPQVCGA53dN H0nJbz0EmGfLvtAsiiNSscbD2U6uodsGOj/Vi+7lRWcXn/pdLf/ZPASunmLeZ4e969l5 naBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to:subject :mime-version; bh=5F/6ppGf5f5RC21lv2DWiM0Qg2IFl3ywhNDlAioXIzc=; b=AkkFiJLedWYDhVGhQuo9EvtYK7GzlvE32A2nrLMi0bxZSsDSl0aukpjsG8ypMoK4NE O+6v8WRaZkCB1p+YlNALAWG8a6q/mI6sgpLNEAEIx8vjJG/bN04y4cqHhlNQJjdksW1C ZPbXUM5/FUtc7m7yRzbVv7DojzAfBKy0e0je/WyNnhQndf0AHyJclH/d/CazEZ04UcSq ddKIH3PNmtJ6sEOhGhST/L3cPNPbabcZCpy5SfKn5xITefPZ+94HLi5ORk1f9jalGIEm kKoe/FMP0pr3ixbkl3Bq6UzrCNAGdDa4wqlBOyzgUjrUGJfnWq+fStinG08M5PDE8gWm oLmQ== X-Gm-Message-State: AOAM533+W7w2VJO/Y49fit3yee5n2iI+o+nehk7DwtsNqLumy0M9tn0T OQpeTzkvxS7rwNbe0NMw8d8= X-Google-Smtp-Source: ABdhPJzD2HPMHWHcJUSfvYVzfUU3o37A5QBsTFJu2ervmeSDMbEuUG3wm6Uh9d9es0tVVhlA1awXHQ== X-Received: by 2002:a05:6214:321:: with SMTP id j1mr330408qvu.32.1610984452496; Mon, 18 Jan 2021 07:40:52 -0800 (PST) Received: from [2607:fb90:50ee:129f:100::] ([2607:fb90:50ee:129f:a532:6d2f:f309:1bed]) by smtp.gmail.com with ESMTPSA id q70sm10855601qka.107.2021.01.18.07.40.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 07:40:50 -0800 (PST) Date: Mon, 18 Jan 2021 10:40:46 -0500 From: Blairemaloneback To: Sachin Kumar Cc: Pgsql-Admin , Pgsql-Admin , Krishna Message-ID: <3e60e23c-9df4-4143-9cdd-9ecbb410c504@iPhone> In-Reply-To: Subject: Re: How to manage null value while copy data from csv MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="6005abfe_6b8b4567_133fd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --6005abfe_6b8b4567_133fd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Got it, thanks. > > On Dec 31, 2020 at 1:26 AM, wrote: > > > > Hi experts, > > > when I am uploading data (CSV File) using the COPY command. I am getting below mention error. > > > > ERROR: null value in column "adj_type" violates not-null constraint. > > > > When I define null it gives no error message, but how to manage null value n data without defining it, because there is many more columns. when it defines null it gives an error if null value comes you are violating null. > > > > Please suggest how to manage null value in postgresql? > > > > > > > -- > > > Best Regards, > Sachin Kumar > --6005abfe_6b8b4567_133fd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Got i= t, thanks. 




On Dec 31, 2020 at 1:26 AM, <Sachin Kumar> wrote:

Hi experts,

when I am uploading = data (CSV =46ile) using the COPY command. I am getting below mention erro= r.

ERROR:  null value in column =22adj=5Fty= pe=22 violates not-null constraint.

When I defin= e null it gives no error message, but how to manage null value n dat= a without defining it, because there is many more columns. when it d= efines null it gives an error if null value comes you are violating = null.

Please suggest how to manage null value in= postgresql=3F



--

Best Regards,
Sachin Kumar
--6005abfe_6b8b4567_133fd--