core: Fix stored procedure with SQL language.
core: Fix stored procedure with SQL language.

Stored procedure with SQL language.
Need special arguments references. As specified here:
http://www.postgresql.org/docs/current/static/xfunc-sql.html
section 35.4.1
This bug need further consideration to be caught by
testing framework.

Solution: change stored procedure to use plpgsql language.

Change-Id: If59c2349d16dde4f6a64e654230db66fe3bd53f2
Bug-Url: https://bugzilla.redhat.com/1244154
Signed-off-by: Dudi Maroshi <7016c2e263b6706308489e03133ea612b925c5bf@redhat.com>

walteryang47/ovirt-engine,eayun/ovirt-engine,yingyun001/ovirt-engine,yapengsong/ovirt-engine,yingyun001/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine,yapengsong/ovirt-engine,OpenUniversity/ovirt-engine,walteryang47/ovirt-engine,walteryang47/ovirt-engine,zerodengxinchao/ovirt-engine,walteryang47/ovirt-engine,zerodengxinchao/ovirt-engine,yingyun001/ovirt-engine,eayun/ovirt-engine,eayun/ovirt-engine,walteryang47/ovirt-engine,OpenUniversity/ovirt-engine,yapengsong/ovirt-engine,yapengsong/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine,zerodengxinchao/ovirt-engine,OpenUniversity/ovirt-engine,zerodengxinchao/ovirt-engine,eayun/ovirt-engine,yingyun001/ovirt-engine,OpenUniversity/ovirt-engine,zerodengxinchao/ovirt-engine