- Original Message -
From: Jasbinder Singh Bali
To: pgsql-general@postgresql.org
Sent: Monday, July 16, 2007 3:55 PM
Subject: [GENERAL] Capturing return value of a function
I was wondering what would the function return if insert fails.
I want it to return 'success
"Jasbinder Singh Bali" <[EMAIL PROTECTED]> writes:
> I was wondering what would the function return if insert fails.
It would abort immediately and abort your transaction as well unless something
higher up catches the error.
> I want it to return 'success' upon a successful insert and 'failure
On Jul 16, 2007, at 15:55 , Jasbinder Singh Bali wrote:
I was wondering what would the function return if insert fails.
I want it to return 'success' upon a successful insert and
'failure' if
insert fails.
Depends on what you mean by "failed". Do you mean an error was
raised? Then you'l
Hi,
I have a function like this
CREATE OR REPLACE FUNCTION sp_insert(text, text, text, text)
RETURNS text AS
$BODY$
BEGIN
INSERT INTO tbl(a,b,c,d)
VALUES ($1,$2, $3, $4);
RETURN 'success';
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
I was wondering what would the fu
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> I'm calling a plpgsql function in a plperl function.
> plpgsql function is a simple select query returning a single row of records.
> How can i retrieve the values of different fields in my plperl function?
Please check out the page:
http://
Hi,
I'm calling a plpgsql function in a plperl function.
plpgsql function is a simple select query returning a single row of records.
How can i retrieve the values of different fields in my plperl function?
If i write something like
my $query = "SELECT sp_select";
my $exec = spi_exec_query($sp_