Bruce, this error and the one in your earlier post are not indicative
of the bug, but rather of the connection failing - looking at the
created ecpgdebug file should confirm this.

I have since compiled 7.3 with the patch locally and cannot recreate
the bug (after messing around with the HBA cfg file - I was getting
the same error as you).

My command line (with 7.3 sitting in /database/pgsql-test on port 5433
and LD_LIBRARY_PATH setup):

 /database/pgsql-test/bin/ecpg insert-float.pgc
 gcc insert-float.c -I/database/pgsql-test/include -L/database/pgsql-test/lib -lecpg 
-lpq
 ./a.out floattest@localhost:5433

Regards, Lee Kindness.

Bruce Momjian writes:
 > I am now getting this error:
 >      #$  ./a.out floattest
 >      col1: -0.000006
 >      *!*!* Error -220: No such connection NULL in line 21.
 > I will wait for Michael to comment on this.
 > 
 > ---------------------------------------------------------------------------
 > 
 > Lee Kindness wrote:
 > > Lee Kindness writes:
 > >  > and the NULL goes... bang! I guess the '-' wasn't factored in and 21
 > >  > bytes would be enough. Patch against current CVS (but untested):
 > > 
 > > Ooops, a context diff is below...
 > > 
 > > Index: src/interfaces/ecpg/lib/execute.c
 > > ===================================================================
 > > RCS file: /projects/cvsroot/pgsql/src/interfaces/ecpg/lib/execute.c,v
 > > retrieving revision 1.36
 > > diff -c -r1.36 execute.c
 > > *** src/interfaces/ecpg/lib/execute.c      2002/01/13 08:52:08     1.36
 > > --- src/interfaces/ecpg/lib/execute.c      2002/06/11 11:45:35
 > > ***************
 > > *** 700,706 ****
 > >                            break;
 > >   #endif   /* HAVE_LONG_LONG_INT_64 */
 > >                    case ECPGt_float:
 > > !                          if (!(mallocedval = ECPGalloc(var->arrsize * 20, 
 >stmt->lineno)))
 > >                                    return false;
 > >   
 > >                            if (var->arrsize > 1)
 > > --- 700,706 ----
 > >                            break;
 > >   #endif   /* HAVE_LONG_LONG_INT_64 */
 > >                    case ECPGt_float:
 > > !                          if (!(mallocedval = ECPGalloc(var->arrsize * 21, 
 >stmt->lineno)))
 > >                                    return false;
 > >   
 > >                            if (var->arrsize > 1)
 > > ***************
 > > *** 720,726 ****
 > >                            break;
 > >   
 > >                    case ECPGt_double:
 > > !                          if (!(mallocedval = ECPGalloc(var->arrsize * 20, 
 >stmt->lineno)))
 > >                                    return false;
 > >   
 > >                            if (var->arrsize > 1)
 > > --- 720,726 ----
 > >                            break;
 > >   
 > >                    case ECPGt_double:
 > > !                          if (!(mallocedval = ECPGalloc(var->arrsize * 21, 
 >stmt->lineno)))
 > >                                    return false;
 > >   
 > >                            if (var->arrsize > 1)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to