From: | Laurent FAILLIE <l_faillie(at)yahoo(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Solution for bug #899 |
Date: | 2003-03-05 16:42:53 |
Message-ID: | 20030305164253.56843.qmail@web13506.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
I have patched pg_dump.c to have a correct output file
when the database use procedure langages.
Bye
Laurent
PS: I have tryed to send the full source code as
attachement but my message never appear in this ML, so
I hope this diff file is enought ...
**** diff ****
603a604,606
> MoveToStart(g_fout, "ACL LANGUAGE");
> MoveToStart(g_fout, "PROCEDURAL LANGUAGE");
> MoveToStart(g_fout, "FUNC PROCEDURAL LANGUAGE");
3522c3525
< dumpACL(fout, "LANGUAGE", tmp, lanname,
---
> dumpACL(fout, "ACL LANGUAGE", tmp, lanname,
3526a3530,3531
>
>
3627a3633
> char *funcproclang;
3643c3649,3650
< "(SELECT lanname FROM pg_catalog.pg_language
WHERE oid = prolang) as lanname "
---
> "(SELECT lanname FROM pg_catalog.pg_language
WHERE oid = prolang) as lanname, "
> "exists (SELECT 'x' FROM
pg_catalog.pg_language WHERE lanplcallfoid =
pg_catalog.pg_proc.oid) as funcproclang "
3655c3662,3663
< "(SELECT lanname FROM pg_language WHERE oid
= prolang) as lanname "
---
> "(SELECT lanname FROM pg_language WHERE oid
= prolang) as lanname, "
> "exists (SELECT 'x' FROM pg_language WHERE
lanplcallfoid = pg_proc.oid) as funcproclang "
3667c3675,3676
< "(SELECT lanname FROM pg_language WHERE oid
= prolang) as lanname "
---
> "(SELECT lanname FROM pg_language WHERE oid
= prolang) as lanname, "
> "exists (SELECT 'x' FROM pg_language WHERE
lanplcallfoid = pg_proc.oid) as funcproclang "
3697a3707
> funcproclang = PQgetvalue(res, 0, PQfnumber(res,
"funcproclang"));
3768c3778
< finfo->usename, "FUNCTION", NULL,
---
> finfo->usename,
strcmp(funcproclang,"t")?"FUNCTION":"FUNC PROCEDURAL
LANGUAGE", NULL,
4874a4885,4886
> char acl_lang=0;
>
4877a4890,4894
> if(!strcmp(type,"ACL LANGUAGE")){
> type = "LANGUAGE";
> acl_lang = 1;
> }
>
4992c5009
< "ACL", NULL, sql->data, "", NULL, NULL, NULL);
---
> acl_lang ? "ACL LANGUAGE" : "ACL", NULL,
sql->data, "", NULL, NULL, NULL);
=====
The misspelling master is on the Web.
_________ 100 % Dictionnary Free !
/ /(
/ Dico / / Pleins d'autres fautes sur
/________/ / http://go.to/destroyedlolo
(#######( / http://destroyedlolo.homeunix.org:8080
Quoi, des fautes d'orthographe! Pas possible ;-D.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Langille | 2003-03-06 19:25:49 | pg_dumpall ignores --globals-only |
Previous Message | Edoardo Panfili | 2003-03-05 09:59:06 | reload of shared library |