Re: plpgsql return setof integer?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Christopher Murtagh <christopher(dot)murtagh(at)mcgill(dot)ca>
Cc: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql return setof integer?
Date: 2003-11-13 03:57:28
Message-ID: 20031113035727.GB1232@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2003-11-13 04:33:54 Re: RHEL
Previous Message Tom Lane 2003-11-13 03:37:20 Re: Curious about exclusive table locks