| From: | Itai Zukerman <zukerman(at)math-hat(dot)com> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: btree_gist, gint4_union |
| Date: | 2003-03-17 21:06:40 |
| Message-ID: | 87u1e18zz3.fsf@pip.dynamiclogic.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> 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 <http://www.math-hat.com/~zukerman/>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Susan Hoddinott | 2003-03-18 02:01:16 | Re: Create function statement with insert statement |
| Previous Message | Tom Lane | 2003-03-17 20:51:55 | Re: upcasting multiplication in a query |