Problem with PostgreSQL execution sleep

Hi, my Postgre query is SELECT pg_sleep(‘10’);
But it failed with this errors:
Processing failed.
Failed to execute SQL statement.
Invalid storage type: DBNull.

What is wrong? Can you help me, please?

DO-block helped:
DO $$
perform pg_sleep(10);
END $$;

Yes, if you want to execute “non-SQL” code co called PLSQL then you have to use do $$ begin end $$; block. Nice postgresql tutorial is here:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.