Re: plpgsql return setof integer? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: plpgsql return setof integer?
Date
Msg-id 20031113035727.GB1232@dcc.uchile.cl
Whole thread Raw
In response to plpgsql return setof integer?  (Christopher Murtagh <christopher.murtagh@mcgill.ca>)
Responses Re: plpgsql return setof integer?
List pgsql-general
On Wed, Nov 12, 2003 at 05:35:40PM -0500, Christopher Murtagh wrote:

> chris=# select htsearch('sample_return2.txt','dbname');
>              htsearch
> ----------------------------------
>  {HASH(0x835c298),2100,2113,2114}
> (1 row)
>
> Any obvious thing that I'm doing wrong? I'm using 7.4RC2. As always, any
> help or info would be much appreciated. Bonus points if someone knows
> what the HASH is. :-)

You are initializing the array incorrectly in your htdig(text, text)
function.  {} is the hash reference you are seeing; HASH(0xwhatever) is
its text representation.  Do

 my @Result = ();

instead, or leave it uninitialized.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Un poeta es un mundo encerrado en un hombre" (Victor Hugo)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Curious about exclusive table locks
Next
From: Lamar Owen
Date:
Subject: Re: RHEL