o int[][].
- Original Message
From: Robert Haas
To: Sophie Yang
Cc: Pavel Stehule ; pgsql-hackers@postgresql.org
Sent: Thursday, March 5, 2009 6:51:48 PM
Subject: Re: [HACKERS] Use array in a dynamic statement
On Thu, Mar 5, 2009 at 8:32 PM, Sophie Yang wrote:
>
> I was wonderin
by the
length of the dewy index, which is equivalent to sort the nodes by their tree
depth. That's what I try to achieve. Maybe someone has different idea to
implement the function?
Thanks,
Sophie
- Original Message
From: Pavel Stehule
To: Sophie Yang
Cc: pgsql-ha
Hi,
I am trying to implement a PL/PgSQL function as following:
CREATE OR REPLACE FUNCTION sort_by_d_idx (nids INT[][], tbl_name VARCHAR)
RETURNS varchar[]
AS $$
DECLARE
result varchar[];
BEGIN
EXECUTE 'SELECT ARRAY(SELECT t.idx FROM generate_series(array_lower($1,1),
array_upper($1,1)) AS s