dbTalk Databases Forums  

[BUGS] pg_dump bud with functions

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


Discuss [BUGS] pg_dump bud with functions in the mailing.database.pgsql-bugs forum.



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

Default [BUGS] pg_dump bud with functions - 10-27-2005 , 09:30 AM






Hello,

PostgreSQL 8.0.x, 8.1beta3, WinXP Pro SP2

When I create a function in sql or plpgsql languages,
their body text is stored in the database files with
0D 0A line ends (I checked it in a hex editor).

If I create plain backup using pg_dump
it generates functions with
0D 0D 0A on the end of the body lines,
so when I open function definition in PGAdmin,
for example, I saw function text with extra empty lines:

CREATE OR REPLACE FUNCTION "foo"()
RETURNS bar AS
$$

select * from "bar"

where bla-bla

order by bla-bla;

$$
LANGUAGE 'sql' VOLATILE;

It's very annoy, so please fix if it's not very hard.

Thank you!

--
Best regards,
Ivan mailto:Ivan-Sun1 (AT) mail (DOT) ru


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

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

Default Re: [BUGS] pg_dump bud with functions - 10-27-2005 , 09:36 AM






Ivan <Ivan-Sun1 (AT) mail (DOT) ru> writes:
Quote:
When I create a function in sql or plpgsql languages,
their body text is stored in the database files with
0D 0A line ends (I checked it in a hex editor).

If I create plain backup using pg_dump
it generates functions with
0D 0D 0A on the end of the body lines,
Good ol' Windows :-(. Try writing the dump file with "pg_dump -f file"
instead of "pg_dump >file" ... does that make it better?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #3  
Old   
Ivan
 
Posts: n/a

Default Re: [BUGS] pg_dump bud with functions - 10-27-2005 , 09:50 AM



Hello,

Thursday, October 27, 2005, 6:34:36 PM, you wrote:

TL> Ivan <Ivan-Sun1 (AT) mail (DOT) ru> writes:
Quote:
When I create a function in sql or plpgsql languages,
their body text is stored in the database files with
0D 0A line ends (I checked it in a hex editor).

If I create plain backup using pg_dump
it generates functions with
0D 0D 0A on the end of the body lines,
TL> Good ol' Windows :-(. Try writing the dump file with "pg_dump -f file"
TL> instead of "pg_dump >file" ... does that make it better?

Yes, it does.
Thank you very much!


--
Best regards,
Ivan mailto:Ivan-Sun1 (AT) mail (DOT) ru


---------------------------(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
  #4  
Old   
Ivan
 
Posts: n/a

Default Re: [BUGS] pg_dump bud with functions - 10-31-2005 , 03:36 AM



Hello,

TL> Ivan <Ivan-Sun1 (AT) mail (DOT) ru> writes:
Quote:
When I create a function in sql or plpgsql languages,
their body text is stored in the database files with
0D 0A line ends (I checked it in a hex editor).

If I create plain backup using pg_dump
it generates functions with
0D 0D 0A on the end of the body lines,
TL> Good ol' Windows :-(. Try writing the dump file with "pg_dump -f file"
TL> instead of "pg_dump >file" ... does that make it better?

This problem is actual for pg_dumpall because there is no -f file
option for it - output is always written to standard output.
Is it possible to add this option to pg_dumpall too?

Thank you for support!


--
Best regards,
Ivan mailto:Ivan-Sun1 (AT) mail (DOT) ru


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