Обсуждение: BUG #2369: pg_dump function dependencies
The following bug has been logged online:
Bug reference: 2369
Logged by: Jonathan Ellis
Email address: jbellis+ns@gmail.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));
"Jonathan Ellis" <jbellis+ns@gmail.com> writes:
> 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
No, it isn't, and this should not matter because pg_dump takes care to
turn off check_function_bodies. If you have an actual problem, you need
to exhibit it, not just claim there is a problem.
BTW, what was the other problem?
regards, tom lane
On 4/2/06, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > "Jonathan Ellis" <jbellis+ns@gmail.com> writes: > > 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 > > No, it isn't, and this should not matter because pg_dump takes care to > turn off check_function_bodies. Ah, that was the problem -- I manually split my dump file into two sections, so only the first section had this set. Sorry. BTW, what was the other problem? > Meh, I realized that one was a PEBKC and removed it, but forgot to fix the preamble. Yesterday wasn't a good day for me. :)