dbTalk Databases Forums  

[BUGS] BUG #2369: pg_dump function dependencies

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2369: pg_dump function dependencies in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jonathan Ellis
 
Posts: n/a

Default [BUGS] BUG #2369: pg_dump function dependencies - 04-02-2006 , 07:12 PM







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

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

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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2369: pg_dump function dependencies - 04-02-2006 , 07:31 PM






"Jonathan Ellis" <jbellis+ns (AT) gmail (DOT) com> writes:
Quote:
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

---------------------------(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


Reply With Quote
  #3  
Old   
Jonathan Ellis
 
Posts: n/a

Default Re: [BUGS] BUG #2369: pg_dump function dependencies - 04-04-2006 , 02:12 PM



------=_Part_25925_64675.1144087474964
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 4/2/06, Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> wrote:
Quote:
"Jonathan Ellis" <jbellis+ns (AT) gmail (DOT) 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?
Quote:
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.

------=_Part_25925_64675.1144087474964
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 4/2/06, <b class=3D"gmail_sendername">Tom Lane</b> &lt;<a href=3D"mailto=
:tgl (AT) sss (DOT) pgh.pa.us">tgl (AT) sss (DOT) pgh.pa.us</a>&gt; wrote:<div><span class=3D"gma=
il_quote"></span><blockquote class=3D"gmail_quote" style=3D"border-left: 1p=
x solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&quot;Jonathan Ellis&quot; &lt;<a href=3D"mailto:jbellis+ns (AT) gmail (DOT) com">jbel=
lis+ns (AT) gmail (DOT) com</a>&gt; writes:<br>&gt; I have many many instances of thes=
e two problems in pg_dump's output:<br><br>&gt; 1) function code don't seem=
to be taken into account for dependencies
<br><br>No, it isn't, and this should not matter because pg_dump takes care=
to<br>turn off check_function_bodies.</blockquote><div><br>Ah, that was th=
e problem -- I manually split my dump file into two sections, so only the f=
irst section had this set.&nbsp; Sorry.
<br>&nbsp;</div><br><blockquote class=3D"gmail_quote" style=3D"border-left:=
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex=
;">BTW, what was the other problem?<br></blockquote></div><br>Meh, I realiz=
ed that one was a PEBKC and removed it, but forgot to fix the preamble.&nbs=
p; Yesterday wasn't a good day for me.
<br><br>

------=_Part_25925_64675.1144087474964--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.