0
I’m trying to pass a timestamp per parameter for a Function, but I end up getting an error
ERROR: invalid input syntax for type time: "10"
the stretch where I pass is:
select agendar('2010-01-01 10:00:01')
the stretch you receive is:
CREATE OR REPLACE FUNCTION agendar(dia timestamp) returns bool as $$
declare
-- aqui eu declaro as variaveis....
begin
-- aqui o meu codigo
end
$$ language plpgsql
What is the full function body? I suggest removing the mysql tag if it is a function for postgresql.
– Murillo Goulart
The body contained some operations, the error appeared all the time, so I erased everything and released a true Return; and the error continued
– Renan Bicudo Ferrari
@Renanbicudoferrari If you run "select current_timestamp;" is the content being displayed similar to the format of how you are passing the parameter? Also check that when running "show datestyle;" it is with the standard which is "ISO, DMY"
– Camilo Santos