CREATE OR REPLACE FUNCTION _chkLogin(userid varchar,pwd varchar) RETURNS BOOLEAN AS $BODY$ DECLARE passed BOOLEAN; BEGIN SELECT (_password = $2) FROM _vRegistration WHERE _userid = $1; RETURN passed; END; $BODY$ LANGUAGE 'plpgsql';
SELECT _chkLogin('username','abcd') as passed;
ERROR: query has no destination for
result data
我使用了执行,然后我得到一个不同的问题,
PERFORM _chkLogin('username','abcd');
ERROR: Syntax error at or near
“perform”
建议我应该怎么做才能克服这个错误.