OK, patch applied. Thanks.

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

Roland Karch wrote:
> On Thu, Dec 12, 2002 at 04:49:30PM -0500, Bruce Momjian wrote:
> > I applied the attached patch. Your version looked like it would have
> > doubled the double-quotes.
> 
> Oops - yes, I got that wrong.
> 
> > As you mentioned, you couldn't get bison to
> > work, so you weren't able to test it.  Please look over this patch and
> > make sure it is correct.
> 
> It works fine, just got bison to work on my other computer.
> 
> > Also check the other use of ECPGdisconnect(). 
> > Is that correct?  Does it need "CURRENT"?
> 
> Yes, it's needed. Supplying a NULL pointer instead results in a segfault
> for me. However, it would work if src/interfaces/ecpg/lib/connect.c line
> 468 was patched - checking for NULL before dereferencing a user-supplied
> pointer is generally a good idea.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/interfaces/ecpg/preproc/preproc.y
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/ecpg/preproc/preproc.y,v
retrieving revision 1.204
diff -c -c -r1.204 preproc.y
*** src/interfaces/ecpg/preproc/preproc.y       12 Dec 2002 21:50:01 -0000      1.204
--- src/interfaces/ecpg/preproc/preproc.y       13 Dec 2002 20:27:24 -0000
***************
*** 554,560 ****
                        if (connection)
                                mmerror(PARSE_ERROR, ET_ERROR, "no at option for 
disconnect statement.\n");
  
!                       fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1);
                        whenever_action(2);
                        free($1);
                }
--- 554,561 ----
                        if (connection)
                                mmerror(PARSE_ERROR, ET_ERROR, "no at option for 
disconnect statement.\n");
  
!                       fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);",
!                                       $1 ? $1 : "\"CURRENT\"");
                        whenever_action(2);
                        free($1);
                }
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to