dbTalk Databases Forums  

Re: Functions not dropped.

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Re: Functions not dropped. in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary Doades
 
Posts: n/a

Default Re: Functions not dropped. - 11-01-2004 , 02:10 AM






On 1 Nov 2004 at 20:45, Glen Eustace wrote:

Quote:
When I tried to reload the production database dump, I got a series of
errors relating to functions. I repeated the exercise but this time did
a \df prior to trying to load the database. In the public schema for the
newly created admin database where all the functions from the old one.
It seems that the drop database doesn't drop all of the functions. Is it
supposed to ? I am using 7.4.2 on FC2.

If it isn't is there a way to clean them all out before the load ?

It's more likely that the functions are defined in the template1 database
and so get copied to every new database. You should remove them
from there if you don't want this behaviour.

Cheers,
Gary.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #2  
Old   
Glen Eustace
 
Posts: n/a

Default Re: Functions not dropped. - 11-01-2004 , 01:00 PM






On Mon, 2004-11-01 at 21:14, Sim Zacks wrote:
Quote:
I would check the template1 database to see if you had the functions
defined there as well.
Any functions/structures/data... in template1 will be moved to the new
database. Then when you try to restore the old one it will conflict.
Thanks you.

That is exactly what had happened. I recall on a previous exercise
loading the database but forgetting to created the admin db first and it
loading the whole lot into template1. I remember cleaning out all the
tables etc, I must have forgotten the functions.

Time to re-init the installation.



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



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.