Home > Archive > PostgreSQL Bugs > April 2006 > BUG #2369: pg_dump function dependencies









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author BUG #2369: pg_dump function dependencies
Jonathan Ellis

2006-04-02, 8:28 pm


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));

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Tom Lane

2006-04-02, 8:28 pm

"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_bodie
s. 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Jonathan Ellis

2006-04-04, 8:29 pm

On 4/2/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> "Jonathan Ellis" <jbellis+ns@gmail.com> writes:
>
>
> No, it isn't, and this should not matter because pg_dump takes care to
> turn off check_function_bodie
s.



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. :)

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com