От:
sundaresan raman <netsun_r@yahoo.com>
Дата:
hi, I am new of postgre sql.im using cursors in pgsql and getting tuples successfully returns in c++, but how can i raise exception in the stored function?.pl anyone help me. This is my function : CREATE or REPLACE FUNCTION sp_test_validatePartnerCode(text) RETURNS int4 AS ' DECLAREt_p_code ALIAS FOR $1;curPartner CURSOR FOR SELECT partner_code FROM test_license WHERE partner_code = t_p_code;BEGIN OPEN curPartner; return curPartner; END; 'LANGUAGE 'plpgsql' ; advance thanks , sundar __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/
Re:
От:
"A.Bhuvaneswaran" <bhuvan@symonds.net>
Дата:
> I am new of postgre sql.im using cursors in pgsql and > getting tuples successfully returns in c++, but how > can i raise exception in the stored function?.pl > anyone help me. You can use 'raise exception' for this purpose. Refer this link for details: http://www.postgresql.org/docs/current/interactive/plpgsql-errors-and-messages.html regards, bhuvaneswaran