I am trying to backup the functions in database using the method described here How to take backup of functions only in Postgres.
But it is showing error << was unexpected at this time
.
The code I typed in the command prompt is given below.
psql.exe -U postgres -At dbname > /path/to/output/file.sql <<"__END__"
SELECT pg_get_functiondef(f.oid)
FROM pg_catalog.pg_proc f
INNER JOIN pg_catalog.pg_namespace n ON (f.pronamespace = n.oid)
WHERE n.nspname = 'public';
__END__
Please help.