Re: Repeatable crash in pg_dump (with -d2 info) - Mailing list pgsql-admin

From David Schnur
Subject Re: Repeatable crash in pg_dump (with -d2 info)
Date
Msg-id CAANiQE=fjCFLp2DvUM9r3GVA4+khuyaQ9UFaee7HzFzEkJuYvw@mail.gmail.com
Whole thread Raw
In response to Re: Repeatable crash in pg_dump (with -d2 info)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Repeatable crash in pg_dump (with -d2 info)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
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.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Repeatable crash in pg_dump (with -d2 info)
Next
From: Tom Lane
Date:
Subject: Re: Repeatable crash in pg_dump (with -d2 info)