Re: CURRENTE_DATE

2024-10-24 Thread Muhammad Ikram
Hi, I am just thinking, when DEFAULT CURRENT_DATE is being used in table definition then why the function is again being used in INSERT statement why not use default. Here is sample edb=# create table date_test (id int, hiredate date default current_date); CREATE TABLE edb=# insert into date_tes

Re: CURRENTE_DATE

2024-10-23 Thread Ray O'Donnell
On 22/10/2024 12:31, Rossana Ocampos wrote: *Hello ,* 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. I have defined it as follows variable  DATE

Re: CURRENTE_DATE

2024-10-23 Thread Rich Shepard
On Tue, 22 Oct 2024, Rossana Ocampos wrote: 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, Also, I sugges

Re: CURRENTE_DATE

2024-10-23 Thread Rich Shepard
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

CURRENTE_DATE

2024-10-23 Thread Rossana Ocampos
Hello , 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. I have defined it as follows variable DATE DEFAULT CURRENT_DATE, but I get the following error.