http://gj.pastebin.com/f119e67bc
Looks like psql loves to report on errors, only when -c is used,otherwise return code is always 0...
I tested 8.3 and cvs-head, both have the same issue.
Is that the 'by design' (bug/feature) ?
-- GJ