User Profile
Collapse
-
remove quotations from the table name! -
you can use pg_dumpall > filename. Then to restore you can psql -f filename databasenameLeave a comment:
-
Use the pg_dump -U username -f filename.sql databasename OR pg_dump -U username databasename > filename. It will prompt for a password you would have to enter the password.
Or use pg_dumpall function and see what happens. If you get error with particular table not dumping you can use pg_dump with -t or -T to dump certain table.Leave a comment:
-
Invalid input syntax for type date
I have written this function:
CREATE OR REPLACE FUNCTION get_date2(idate date) RETURNS date AS $$
DECLARE
tmp text;
BEGIN
SELECT to_char(idate, 'FMDDth FMMon YYYY') into tmp;
return tmp::date;
END;
$$ LANGUAGE 'plpgsql';
But when I try to use the function I get this error:
my_dbs=#select get_date2('01/02/1989');
ERROR: invalid input syntax...
No activity results to display
Show More
Leave a comment: