Plpython bug with int8?

From: Bradley McLean <brad(at)bradm(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Plpython bug with int8?
Date: 2001-09-28 16:05:20
Message-ID: 20010928120519.A32704@bradm.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Can someone else run this and confirm the results against the tip
of the CVS repository?

I'm trying to trace this bug (help welcome too).

(it was hidden in a trigger and a pain to narrow to this point)
-Brad

-----

drop function mul1(int4,int4);
drop function mul2(int4,int4);
drop function callmul1();
drop function callmul2a();
drop function callmul2b();
create function mul1(int4,int4) returns int8 as 'select int8($1) * int8($2)' language 'sql';
create function mul2(int4,int4) returns int8 as 'select int8($1) * 4294967296::int8 + int8($2)' language 'sql';
create function callmul1() returns int8 as 'return plpy.execute("select mul1(6,7) as x")[0]["x"]' language 'plpython';
create function callmul2a() returns int8 as 'select mul2(7,8)' language 'sql';
create function callmul2b() returns int8 as 'return plpy.execute("select mul2(7,8) as x")[0]["x"]' language 'plpython';
select mul1(3,4);
select callmul1();
select mul2(5,6);
select callmul2a();
select callmul2b();

Results:

...
callmul1
----------
42
(1 row)

mul2
-------------
21474836486
(1 row)

callmul2a
-------------
30064771080
(1 row)

psql:bug:14: pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
psql:bug:14: connection to server was lost

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message frederic massot 2001-09-28 16:13:36 Re: Problem with the accents
Previous Message Lincoln Yeoh 2001-09-28 15:32:32 Re: Spinlock performance improvement proposal