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.89) (envelope-from ) id 1gi5j3-0002hC-OZ for pgsql-general@arkaria.postgresql.org; Fri, 11 Jan 2019 22:56:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gi5j2-0008SF-BL for pgsql-general@arkaria.postgresql.org; Fri, 11 Jan 2019 22:56:28 +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 1gi5j1-0008S8-W8 for pgsql-general@lists.postgresql.org; Fri, 11 Jan 2019 22:56:28 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gi5iz-0002vF-Gj for pgsql-general@lists.postgresql.org; Fri, 11 Jan 2019 22:56:26 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id D943D9934D for ; Fri, 11 Jan 2019 14:56:23 -0800 (PST) Date: Fri, 11 Jan 2019 14:56:23 -0800 (PST) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: insert into: NULL in date column Message-ID: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk A table has this column definition: next_contact date DEFAULT '2020-11-06' CONSTRAINT valid_next_date CHECK (next_contact >= CURRENT_DATE), (and I don't know that it needs a default). In an input statement that column is left empty ('') when there's no defined date. When I try to input that table I get a format error: psql:activities.sql:2: ERROR: invalid input syntax for type date: "" LINE 2: ...reaction they''ve experienced environmental issues.','',''); ^ and my web research has not shown me my error. Removing the check constraint does not eliminate that error. Please show me what I've done incorrectly. TIA, Rich