pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: shreedhar <shreedhar@lucidindia.net>
To: Postgres <pgsql-admin@postgresql.org>
Subject: Re: Is it possible to get the return value of trigger function using PHP or any other method.
Date: Sun, 15 Sep 2002 13:11:38 +0530
Message-ID: <001001c25c8b$53a97820$1201a8c0@a4005> (raw)
References: <001801c25ba7$095a3cd0$1201a8c0@a4005>

Hi All,

I solved my problem, I used begin transactions(begin, commit, rollback)
through PHP when i am calling triggered sql statement. 'Raise Error in
trigger function making result of triggered SQL Statement's return value as
NULL.

Using this value we can take decision whether we can commit or rollback
whole transaction.

Thanks Alot, Let me know is there any other way to do this.

Sreedhar
----- Original Message -----
From: "shreedhar" <shreedhar@lucidindia.net>
To: "Postgres" <pgsql-admin@postgresql.org>
Sent: Saturday, September 14, 2002 9:57 AM
Subject: [ADMIN] Is it possible to get the return value of trigger function
using PHP or any other method.


> Hi All,
>
> I would like to put one query which is firing trigger in
transactions(Begin,
> commit and rollback). If the trigger function success then i have to
commit
> transaction, if fails i have to rollback.
>
> How can I send return value of trigger function after executing the query.
>
> Is it possible to get the return value of trigger function using PHP or
any
> other method.
>
> I am using PHP as scripting language, and plpgsql for trigger function.
>
> Regards,
> Sreedhar Bhaskararaju 1,2nd Main Road, KottuGardens, Chennai - 600 085 Ph
:
> 4475111 Email : shreedhar@lucidindia.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly




view thread (2+ messages)

Message-ID: <001001c25c8b$53a97820$1201a8c0@a4005>
Permalink:  ../001001c25c8b$53a97820$1201a8c0@a4005/
Also on:    postgresql.org/message-id/001001c25c8b$53a97820$1201a8c0@a4005

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: shreedhar@lucidindia.net
  Subject: Re: Is it possible to get the return value of trigger function using PHP or any other method.
  In-Reply-To: <001001c25c8b$53a97820$1201a8c0@a4005>
  References: <001801c25ba7$095a3cd0$1201a8c0@a4005> <001001c25c8b$53a97820$1201a8c0@a4005>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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