pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Itai Zukerman <zukerman@math-hat.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: btree_gist, gint4_union
Date: Mon, 17 Mar 2003 16:06:40 -0500
Message-ID: <87u1e18zz3.fsf@pip.dynamiclogic.com> (raw)
In-Reply-To: <200303171959.h2HJxkN20021@candle.pha.pa.us>
References: <200303171959.h2HJxkN20021@candle.pha.pa.us>

> 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/;



view thread (4+ messages)

Message-ID: <87u1e18zz3.fsf@pip.dynamiclogic.com>
Permalink:  ../87u1e18zz3.fsf@pip.dynamiclogic.com/
Also on:    postgresql.org/message-id/87u1e18zz3.fsf@pip.dynamiclogic.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: zukerman@math-hat.com, pgman@candle.pha.pa.us
  Subject: Re: btree_gist, gint4_union
  In-Reply-To: <87u1e18zz3.fsf@pip.dynamiclogic.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox