From: | David Schnur <dnschnur(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Repeatable crash in pg_dump (with -d2 info) |
Date: | 2011-11-23 17:42:03 |
Message-ID: | CAANiQE=fjCFLp2DvUM9r3GVA4+khuyaQ9UFaee7HzFzEkJuYvw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-bugs |
Sure; the function is created programmatically as part of schema creation,
by the same user who owns (almost) everything else in the database. The
definition looks like this:
CREATE OR REPLACE FUNCTION datastore_unpack(
data_times TIMESTAMP WITH TIME ZONE[],
data_values DOUBLE PRECISION[],
OUT data_time TIMESTAMP WITH TIME ZONE,
OUT data_value DOUBLE PRECISION
) RETURNS SETOF RECORD AS $$
SELECT $1[rowx] AS data_time, $2[rowx] AS data_value
FROM generate_series(1, array_upper($1, 1)) AS rowx;
$$ LANGUAGE SQL STABLE;
It takes two parallel arrays and unpacks them into a set of records.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-11-23 18:07:36 | Re: Repeatable crash in pg_dump (with -d2 info) |
Previous Message | Tom Lane | 2011-11-23 17:05:03 | Re: Repeatable crash in pg_dump (with -d2 info) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-11-23 18:07:36 | Re: Repeatable crash in pg_dump (with -d2 info) |
Previous Message | Tom Lane | 2011-11-23 17:05:03 | Re: Repeatable crash in pg_dump (with -d2 info) |