Skip site navigation (1) Skip section navigation (2)

Re: BUG #5043: Stored procedure returning different results for same arguments

From: Martin Edlman <edlman(at)fortech(dot)cz>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5043: Stored procedure returning different results for same arguments
Date: 2009-09-09 09:58:39
Message-ID: 4AA77C4F.4090601@fortech.cz (view raw or flat)
Thread:
Lists: pgsql-bugs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

> please send function xfunc. Your code looks well.
> please try sql function
> ...
> has it same behave like plpgsql function?

Yes, result is the same - it returns 2008-11-01

I made further investigation - it seems the problem is here between the
keyboard and the chair :-)

As I wrote an answer for you I realized the problem. The xfunc() and
therefore get_schemebind_date() is called from a trigger AFTER DELETE ON
schemebind. So the trigger deletes the '2009-09-01' record,
get_schemebind_date() then returns correct result '2008-11-01'. But
xfunc() then fails and the trigger operation is rolled back and I see
the '2009-09-01' record again...
Sorry guys for bothering you and taking your time.

Regards,
- -- 
Martin Edlman
Fortech, spol. s r.o,
Ropkova 51, 57001 Litomyšl
Public GPG key: http://edas.visaci.cz/#gpgkeys
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqnfE4ACgkQqmMakYm+VJ8iswCggwTcu9pZQOaAjAIjW0D22kTs
HYIAni3mLdNilwgxNeQsGFxNogBg6OCL
=ZVLv
-----END PGP SIGNATURE-----

In response to

Responses

pgsql-bugs by date

Next:From: Pavel StehuleDate: 2009-09-09 10:19:15
Subject: Re: BUG #5043: Stored procedure returning different results for same arguments
Previous:From: mahmoud badrDate: 2009-09-09 09:42:43
Subject: BUG #5046: java developer

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group