Re: btree_gist, gint4_union - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: btree_gist, gint4_union
Date
Msg-id 200303171959.h2HJxkN20021@candle.pha.pa.us
Whole thread Raw
In response to btree_gist, gint4_union  (Itai Zukerman <zukerman@math-hat.com>)
Responses Re: btree_gist, gint4_union
Re: btree_gist, gint4_union
List pgsql-sql
I am confused by your question.  It seems it is declared as returning an
int.

---------------------------------------------------------------------------

Itai Zukerman wrote:
> In contrib/btree_gist/ I see:
> 
>   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);
> 
> Is the int4 return type declared above a bug?
> 
> -- 
> Itai Zukerman  <http://www.math-hat.com/~zukerman/>
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: parse error when calling function in plpgsql
Next
From: "John Guthrie"
Date:
Subject: upcasting multiplication in a query