X-Original-To: pgsql-sql@postgresql.org Received: from debbie2.questionmarket.com (debbie2.questionmarket.com [64.7.7.170]) by postgresql.org (Postfix) with ESMTP id BF191475AE5 for ; Mon, 17 Mar 2003 16:06:38 -0500 (EST) Received: from pip.dynamiclogic.com (unknown [192.168.1.12]) by debbie2.questionmarket.com (Postfix) with SMTP id 1D63A879A; Mon, 17 Mar 2003 16:06:41 -0500 (EST) Received: (nullmailer pid 22589 invoked by uid 1000); Mon, 17 Mar 2003 21:06:41 -0000 To: Bruce Momjian Cc: pgsql-sql@postgresql.org Subject: Re: btree_gist, gint4_union From: Itai Zukerman In-Reply-To: <200303171959.h2HJxkN20021@candle.pha.pa.us> (Bruce Momjian's message of "Mon, 17 Mar 2003 14:59:46 -0500 (EST)") References: <200303171959.h2HJxkN20021@candle.pha.pa.us> Date: Mon, 17 Mar 2003 16:06:40 -0500 Message-ID: <87u1e18zz3.fsf@pip.dynamiclogic.com> User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200303/421 X-Sequence-Number: 12460 > I am confused by your question. It seems it is declared as returning an > int. >> CREATE FUNCTION gint4_union(bytea, internal) >> RETURNS int4 >> AS 'MODULE_PATHNAME' >> LANGUAGE 'C'; >> >> but gint4_union does this: >> >> INT4KEY *out = palloc(sizeof(INT4KEY)); >> [...] >> PG_RETURN_POINTER(out); The function returns type INT4KEY, which is a struct of 2 int4's, but is declared as returning just int4. It should be declared to return type int4key, no? I don't think this actually has any negative consequences, though. -- Itai Zukerman