postgresql - perform select fails to compile postgres -
i have sql in want test whether record exists. tried
perform select vote,file vote.file_id=file.file_id , vote.uid = userid , file.basename=abase[1];
with idea of testing whether item given uid , basename found. compiler complained error @ select. make compile had declare version , write:
select file.basename version vote,file ....
can explain why perform here failed? have other seemingly identical code works fine.
thanks.
from postgresql doc, see http://www.postgresql.org/docs/9.1/static/plpgsql-statements.html
note: 1 might expect writing select directly accomplish result, @ present accepted way perform. sql command can return rows, such select, rejected error unless has clause.
Comments
Post a Comment