I wrote a bad command( I made a mistake in the function and want to exit it without completing the function) while trying to write a function, and I want to exit it,but the command prompt of Terminal wont let me.
I tried this : https://unix.stackexchange.com/questions/45646/how-do-i-exit-or-cancel-a-bad-bash-command
also this
stackoverflow.com/questions/12649896/why-doesnt-my-terminal-output-unicode-characters-properly
But none of the solutions given work, I am in this situation now (I was trying to write a pgplsql function and I wanted to end it, but I don't know how)
message=# create function add_message(_queue_id integer, _sender_id integer, _receiver_id integer, _payload text)
message-# returns integer as $$
message$# declare
message$# result integer;
message$# begin
message$# ;
message$# ;
message$# ;
message$# ;
message$# sdsd
message$# end
message$# ;
message$# return result;
message$# end
message$# <aa
message$# -ls
message$# ls
message$# abort
message$# v
message$#
I tried :
ctrl + /
crtl+D
ctrl+Z
ctrl+C
esc key
exit 0
:q
Note: I am using a osx keyboard with swiss-german layout.