BUG #2369: pg_dump function dependencies

From: "Jonathan Ellis" <jbellis+ns(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2369: pg_dump function dependencies
Date: 2006-04-01 23:55:17
Message-ID: 200604012355.k31NtHbq015787@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2369
Logged by: Jonathan Ellis
Email address: jbellis+ns(at)gmail(dot)com
PostgreSQL version: 8.1.3
Operating system: linux
Description: pg_dump function dependencies
Details:

I have many many instances of these two problems in pg_dump's output:

1) function code don't seem to be taken into account for dependencies

for example, one function was dumped as follows (note the %TYPE use), but
the general_permissions table was dumped much later:

CREATE FUNCTION all_users_permission_id(character varying, integer,
character varying) RETURNS integer
AS $_$
DECLARE
v_permission_type alias for $1;
v_on_what_id alias for $2;
v_on_which_table alias for $3;
v_permission_id general_permissions.permission_id%TYPE;

non-%TYPE uses get ignored too; e.g. a function containing this line, before
the minions_power_v view was created:

ttt := ttt +
max(0, coalesce(
(0.661 * (select sum(w.value) from weapons_v w where w.party_id = $1
and w.minion_id is not null)
- (select sum(tp_total) from minions_power_v m where m.party_id =
$1))::int
, 0));

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amaresh Wakkar 2006-04-02 04:49:38 BUG #2370: 25P02, current transaction is aborted, commands ignored until end of transaction block
Previous Message Tom Lane 2006-03-31 23:48:07 Re: BUG #2366: Timestamptz data type is inaccurate