pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
(no subject)
2+ messages / 2 participants
[nested] [flat]

* (no subject)
@ 2003-12-22 10:30 sundaresan raman <netsun_r@yahoo.com>
  2003-12-23 05:22 ` Re: A.Bhuvaneswaran <bhuvan@symonds.net>
  0 siblings, 1 reply; 2+ messages in thread

From: sundaresan raman @ 2003-12-22 10:30 UTC (permalink / raw)
  To: pgsql-sql

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
'
   DECLARE
	t_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/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re:
  2003-12-22 10:30 (no subject) sundaresan raman <netsun_r@yahoo.com>
@ 2003-12-23 05:22 ` A.Bhuvaneswaran <bhuvan@symonds.net>
  0 siblings, 0 replies; 2+ messages in thread

From: A.Bhuvaneswaran @ 2003-12-23 05:22 UTC (permalink / raw)
  To: sundaresan raman <netsun_r@yahoo.com>; +Cc: pgsql-sql

> 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

Attachments:

  signature.asc (application/pgp-signature, 231B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-12-23 05:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-22 10:30  sundaresan raman <netsun_r@yahoo.com>
2003-12-23 05:22 ` Re: A.Bhuvaneswaran <bhuvan@symonds.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox