Re: Solution for bug #899 - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Solution for bug #899
Date
Msg-id 200303071733.h27HXtD28219@candle.pha.pa.us
Whole thread Raw
In response to Solution for bug #899  (Laurent FAILLIE <l_faillie@yahoo.com>)
Responses Re: Solution for bug #899  (Laurent FAILLIE <l_faillie@yahoo.com>)
List pgsql-bugs
Can I get a context diff (diff -c) of this?  What exactly did you
change and why?

---------------------------------------------------------------------------

Laurent FAILLIE wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-bugs by date:

Previous
From: Dan Langille
Date:
Subject: Re: pg_dumpall ignores --globals-only
Next
From: Laurent FAILLIE
Date:
Subject: Re: Solution for bug #899