Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0C452632C56 for ; Mon, 6 Apr 2009 10:07:30 -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 56940-01 for ; Mon, 6 Apr 2009 10:07:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mail.postgresql.org (Postfix) with ESMTP id BC94E632793 for ; Mon, 6 Apr 2009 10:07:22 -0300 (ADT) Received: by gxk24 with SMTP id 24so6289819gxk.19 for ; Mon, 06 Apr 2009 06:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qGtcV7NP2hi5PTmyhIzPNU0V5/O+An9rM2+9XuNY5V8=; b=YXtpcXu6sCNzCS5hQKSUbI02S6lrQq4mEfyXIw0lvJctm/VoYRJPaMHqFrEO5PjsWQ PmTJWi/kQsLDuDRlTLwLKx+cu70I2Sbz1Gw/35LnXdPgop/WZZx9AaCNtOO1Bmtcvm50 fTIH0EUFeINuJCEMMZrW/G9TptIv5AlHPAAqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LlIPUc0zyndubh1B+9TOZeFq9pG57ycmD/hiqdkHOmuHiqG5ukhHzrnkLQyR9SGC/s CPhAF00dUCYCPPAl4pwb/nJfSPALydbtvQtZK14HP7kmCh+mwxCGQePfdi0weW6j6M+t HTmuAGi4gs3pQLv8FTi5w/3W2a1NSuJ/Ud8Z0= MIME-Version: 1.0 Received: by 10.151.45.6 with SMTP id x6mr8365840ybj.187.1239023241305; Mon, 06 Apr 2009 06:07:21 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 Apr 2009 10:07:21 -0300 Message-ID: Subject: Re: [COMMITTERS] From: Emanuel Calvo Franco To: eehab hamzeh Cc: General PostgreSQL List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.032 tagged_above=0 required=5 tests=AWL=0.032 X-Spam-Level: X-Archive-Number: 200904/184 X-Sequence-Number: 146140 2009/4/6 eehab hamzeh : > =A0=A0=A0 Hello > > I am trying to build some functions using C language. these functions are > mentioned in the postgresql documentation. > > http://www.postgresql.org/docs/8.3/interactive/xfunc-c.html > > Datum > add_one_float8(PG_FUNCTION_ARGS) > { > /* The macros for FLOAT8 hide its pass-by-reference nature. */ > float8 arg =3D PG_GETARG_FLOAT8(0); > > PG_RETURN_FLOAT8(arg + 1.0); > } > > PG_FUNCTION_INFO_V1(makepoint); > > Datum > makepoint(PG_FUNCTION_ARGS) > { > /* Here, the pass-by-reference nature of Point is not hidden. */ > Point *pointx =3D PG_GETARG_POINT_P(0); > Point *pointy =3D PG_GETARG_POINT_P(1); > Point *new_point =3D (Point *) palloc(sizeof(Point)); > > new_point->x =3D pointx->x; > new_point->y =3D pointy->y; > > PG_RETURN_POINT_P(new_ > point); > } > > the only function that are work are the one with int32 variable. > the other function bring errors and are not working > any body can give directions > > > kind regards > ihab Re-send to pgsql-general. Can you paste these errors and how you're compiling this? --=20 Emanuel Calvo Franco Sumate al ARPUG ! (www.postgres-arg.org - www.arpug.com.ar) ArPUG / AOSUG Member Postgresql Support & Admin