Unix Technical Forum

BUG #1404: pg_dump: dump order/dependence for a UDF

This is a discussion on BUG #1404: pg_dump: dump order/dependence for a UDF within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1404 Logged by: T.Russell Email address: tirny@mail.ru PostgreSQL version: 7.4.6 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:27 AM
T.Russell
 
Posts: n/a
Default BUG #1404: pg_dump: dump order/dependence for a UDF


The following bug has been logged online:

Bug reference: 1404
Logged by: T.Russell
Email address: tirny@mail.ru
PostgreSQL version: 7.4.6
Operating system: FreeBSD 5.3
Description: pg_dump: dump order/dependence for a UDF
Details:

for example, there is the table:
CREATE TABLE test(
testfield VARCHAR(5)
);

in the process of life it was made (for example):
CREATE OR REPLACE FUNCTION chtest()
RETURNS bpchar AS
'
DECLARE
BEGIN
RETURN \'qwerty\';
END;
'
LANGUAGE 'plpgsql' VOLATILE;

and further:
ALTER TABLE test ALTER COLUMN testfield
SET DEFAULT chtest();

$pg_dump -U user -f file.dump dbname
$dropdb -U user dbname
$createdb -U user -E ... -O ... -T ... dbname
$psql -U user -d dbname < file.dump

error: function chtest dos't exist!

But in the dump it is present, only it is "below" the declaration of the
creation of table. As I understand work of pg_dump: in the dump are
discarded the objects, sort out of the date of creation, without taking
dependences.

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:27 AM
Alvaro Herrera
 
Posts: n/a
Default Re: BUG #1404: pg_dump: dump order/dependence for a UDF

On Sun, Jan 16, 2005 at 03:43:38PM +0000, T.Russell wrote:

> As I understand work of pg_dump: in the dump are discarded the
> objects, sort out of the date of creation, without taking dependences.


That's right. 8.0's pg_dump does the right thing.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Amanece. (Ignacio Reyes)
El Cerro San Cristóbal me mira, cínicamente, con ojos de virgen"

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

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com