From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Cristian Prieto" <cristian(at)clickdiario(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Troubles with array_ref |
Date: | 2005-11-08 22:12:52 |
Message-ID: | 9297.1131487972@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
"Cristian Prieto" <cristian(at)clickdiario(dot)com> writes:
> Well, anyway, this is the Stored Function I've been workin on; it simply
> take an array and an integer just to return this item from the array; The
> array could have any kind of elements so I declare it as anyarray (the
> parameter) and anyelement (the return value), please help me, I don't know
> where to get info about it.
You could save yourself a lot of time if you enabled warnings from your
C compiler (eg, -Wall for gcc) and then paid some attention to them.
The last parameter to array_ref is a bool *, not a bool, and I have no
doubt that the backend is crashing while trying to dereference "false".
(Another problem is that the fourth parameter should be -1 not VARSIZE.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ledina Hido | 2005-11-08 22:18:55 | Transactions, Triggers and Error Messages |
Previous Message | lh1101 | 2005-11-08 22:09:17 | Transactions, Triggers and Error Messages |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-11-08 22:48:16 | Re: Interval aggregate regression failure (expected seems |
Previous Message | Cristian Prieto | 2005-11-08 21:56:40 | Troubles with array_ref |