Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t3aoL-00DSsL-K7 for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2024 12:50:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t3aoI-009TdV-L1 for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2024 12:49:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t3aoI-009TdJ-A9 for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2024 12:49:58 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t3aoG-002SDq-5Z for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2024 12:49:57 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 322D82A14D6 for ; Wed, 23 Oct 2024 05:49:54 -0700 (PDT) Date: Wed, 23 Oct 2024 05:49:54 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: CURRENTE_DATE In-Reply-To: <00b001db2475$e6584640$b308d2c0$@bry-it.com> Message-ID: References: <00b001db2475$e6584640$b308d2c0$@bry-it.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 22 Oct 2024, Rossana Ocampos wrote: > I am new with PostgreSQL and I have a bug. I have created a function that > has an input variable of type date , in case it does not receive value , > it has to assume by default the current date. > ERROR: invalid input syntax for type date: "CURRENT_DATE" LINE 1: > ...extsupplydate ('1085018'::bigint, '5278'::bigint, 'CURRENT_D... ^ ERROR: > invalid input syntax for type date: "CURRENT_DATE" SQL status: 22007 > Characters: 78 Rossana, I have several tables with default values, including dates. Change your input's values to `default' (without the quotes.) Regards, Rich