Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6B2C6634914 for ; Wed, 18 Mar 2009 10:18:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 63921-05 for ; Wed, 18 Mar 2009 10:18:49 -0300 (ADT) X-Greylist: delayed 00:05:26.245758 by SQLgrey-1.7.6 Received: from n29.bullet.mail.ukl.yahoo.com (n29.bullet.mail.ukl.yahoo.com [87.248.110.146]) by mail.postgresql.org (Postfix) with SMTP id 6363F63461B for ; Wed, 18 Mar 2009 10:18:54 -0300 (ADT) Received: from [217.12.4.215] by n29.bullet.mail.ukl.yahoo.com with NNFMP; 18 Mar 2009 13:13:24 -0000 Received: from [87.248.111.150] by t2.bullet.ukl.yahoo.com with NNFMP; 18 Mar 2009 13:13:24 -0000 Received: from [127.0.0.1] by omp207.mail.ukl.yahoo.com with NNFMP; 18 Mar 2009 13:13:24 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 533414.83934.bm@omp207.mail.ukl.yahoo.com Received: (qmail 46771 invoked by uid 60001); 18 Mar 2009 13:13:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1237382004; bh=W1Sb/ng5s+wALg3XRMfhYAsLsSoz2GY9qqr6E1M8mws=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=I+kmfhDJYR2k2wOP2hS1Y7uzP4hF9Rj2ySowrbqFYzM9ocu6NHmEBT0LBNjwChB66Jzbk0tbtp9aCPOA3/vMfTOk05YH/Ps+Qhxm/ANuGZkuKSSyURi4vEa6QahmtLz8Ij0Gj7b3Q/DhEeeh/y6hGMVAjRjyFeGMoVMEdC9zdtU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0Qp99CSIfzlYZmyvS2XktSo7kXn3+I9w+/LGTG70lje0PH+Wa7HeTw1Swy5ZXb+d0qLLV6T3CdImEPi+Fn9XPQVS1ZQK6wpV++t1zbUJCbj/uPwsyiB0pxAC9ZZa2nWNtrZC5ZPmWNx6bn8lbGz8bhN6HAnaMcn3ONfgx0KOuW0=; Message-ID: <238982.46441.qm@web28504.mail.ukl.yahoo.com> X-YMail-OSG: GXioYG8VM1mtDyNf.rzoj.foYZpnWWVAIyFsOTZ7_rEKZUQMHW9N7d9064BphNKQfKdqgdX60cCrPhcJ2y8DJLWnIdJgETVOoOgblCcm07rZunJSW5Rq6jSnv._kKTzeRpYul2KHhymKHUXyAMoPF9kyZUXjJfpUGMFJxw_ZQiB5qryX4ugzKeeTAxNzXfxwFZmIxmmX9Qt8Hdt2oIB9dp1fC5ZjI_y1 Received: from [85.27.68.116] by web28504.mail.ukl.yahoo.com via HTTP; Wed, 18 Mar 2009 13:13:23 GMT X-Mailer: YahooMailClassic/5.1.20 YahooMailWebService/0.7.289.1 Date: Wed, 18 Mar 2009 13:13:23 +0000 (GMT) From: Ben Ali Rachid Subject: Function C and INOUT parameters To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-885718829-1237382003=:46441" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.468 tagged_above=0 required=5 tests=HTML_IMAGE_ONLY_24=2.207, HTML_MESSAGE=0.001, WHOIS_DMNBYPROXY=0.26 X-Spam-Level: ** X-Archive-Number: 200903/2 X-Sequence-Number: 6861 --0-885718829-1237382003=:46441 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 =0A =0AI have created a function (on Windows XP) in PostgreSQL 8.3.6 with 2 ino= ut parameters. His code is : =0A =0ACREATE OR REPLACE FUNCTION add_one(INOUT arg1 integer, INOUT arg2 intege= r) =0ARETURNS record=20 =0AAS '$libdir/myDLL.dll', 'add_one' =0ALANGUAGE 'c' VOLATILE STRICT ; =0A =0AIn my DLL (created with Visual Studio Pro 2008), I have a function C (it= 's just a test function) : =0A =0Avoid add_one(int arg1, int arg2) =0A{ =0A=09arg1 =3D arg1 + 1 ; =0A=09arg2 =3D arg2 + 1 ; =0A} =0A =0AWhen I try to execute my function (select * from add_one(10, 20)), the s= erver crashes . The problem is that if I use a function with one INOUT pa= rameter like this : CREATE OR REPLACE FUNCTION add_one(INOUT arg integer) =0ARETURNS integer=20 =0AAS '$libdir/myDLL.dll', 'add_one' =0ALANGUAGE 'c' VOLATILE STRICT ; void add_one(int arg) =0A{ =0A=09arg =3D arg + 1 ; =0A} , everything is OK. I think the problem is related to "RETURNS record", but= I have no idea to solve it =0A =0AAny idea ? =0AThanks =0A =0A=0A=0A --0-885718829-1237382003=:46441 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
H= ello,
=0A
=0AI have created a function (on Windows XP) in PostgreSQL= 8.3.6 with 2 inout parameters. His code is :
=0A
=0ACREATE OR REPLACE FUNCTION add_one(INOUT arg1 integer, = INOUT arg2 integer)
=0ARETURNS record
=0AAS '$libdir/myDLL.dll', 'add_one'
=0ALANGUAGE 'c' VOLATILE STRI= CT ;
=0A
=0AIn my DLL (created with Visual Studio Pro 2008), I= have a function C (it's just a test function) :
=0A
=0Avoid add_one(int arg1, int arg2)
=0A{
=0A=09arg1 = =3D arg1 + 1 ;
=0A=09arg2 =3D arg2 + 1 ;
=0A}
=0A
=0AWhen I = try to execute my function (select * from add_one(10, 20)), the server cras= hes 3D= . The problem is th= at if I use a function with one INOUT parameter like this :

<= span style=3D"font-style: italic;" name=3D"intelliTxt" id=3D"intelliTxt">CR= EATE OR REPLACE FUNCTION add_one(INOUT arg integer)
=0ARETURNS integer <= br>=0AAS '$libdir/myDLL.dll', 'add_one'
=0ALANGUAGE 'c' VOLATILE STRICT = ;


void add_= one(int arg)
=0A{
=0A=09arg =3D arg + 1 ;
=0A}

, everything is OK. I think the p= roblem is related to "RETURNS record", but I have no idea to solve it
=0A
=0AAny idea ?
=0AThanks=
=0A

=0A=0A=0A=0A --0-885718829-1237382003=:46441--