patches for 6.5.0 - Mailing list pgsql-hackers

From Massimo Dal Zotto
Subject patches for 6.5.0
Date
Msg-id 199904301552.RAA06337@nikita.wizard.net
Whole thread Raw
Responses Re: [HACKERS] patches for 6.5.0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I have some patches for the current snapshot (1999-04-28):


1)    an old patch I had already posted and which has never applied.

*** src/backend/tcop/postgres.c.orig    Tue Mar 23 09:03:08 1999
--- src/backend/tcop/postgres.c    Thu Apr  1 14:42:46 1999
***************
*** 925,930 ****
--- 925,931 ----     fprintf(stderr, "\t-e \t\tturn on European date format\n");     fprintf(stderr, "\t-o file\t\tsend
stdoutand stderr to given filename \n");     fprintf(stderr, "\t-s \t\tshow stats after each query\n");
 
+     fprintf(stderr, "\t-T options\tspecify pg_options\n");     fprintf(stderr, "\t-v version\tset protocol version
beingused by frontend\n");     fprintf(stderr, "\t-W \t\twait N seconds to allow attach from a debugger\n"); }
 
***************
*** 1018,1024 ****     optind = 1;                    /* reset after postmaster usage */      while ((flag =
getopt(argc,argv,
 
!                           "A:B:CD:d:Eef:iK:Lm:MNOo:P:pQS:st:v:x:FW:"))            != EOF)         switch (flag)
 {
 
--- 1019,1025 ----     optind = 1;                    /* reset after postmaster usage */      while ((flag =
getopt(argc,argv,
 
!                           "A:B:CD:d:EeFf:iK:Lm:MNOo:P:pQS:sT:t:v:x:W:"))            != EOF)         switch (flag)
   {
 


2)    a compilation error in dt.c, probably a wrong cut-and-paste.

*** src/backend/utils/adt/dt.c.orig    Mon Apr 26 09:00:43 1999
--- src/backend/utils/adt/dt.c    Thu Apr 29 14:04:16 1999
***************
*** 3069,3079 ****                 *tzp = -(tm->tm_gmtoff);    /* tm_gmtoff is Sun/DEC-ism */ #elif
defined(HAVE_INT_TIMEZONE) #ifdef __CYGWIN__
 
!                        *tzp = ((tm->tm_isdst > 0) ? (_timezone - 3600) : _timez
! one);  #else
!                         *tzp = ((tm->tm_isdst > 0) ? (timezone - 3600) : timezon
! e);  #endif #else #error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
--- 3069,3077 ----                 *tzp = -(tm->tm_gmtoff);    /* tm_gmtoff is Sun/DEC-ism */ #elif
defined(HAVE_INT_TIMEZONE) #ifdef __CYGWIN__
 
!                        *tzp = ((tm->tm_isdst > 0) ? (_timezone - 3600) : _timezone);  #else
!                         *tzp = ((tm->tm_isdst > 0) ? (timezone - 3600) : timezone);  #endif #else #error
USE_POSIX_TIMEis defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
 



3)    libpgtcl has problems with notify. It seems a bug in the be/feprotocol. Libpgtcl prints the following message and
theprogramhangs forever:
 
    unexpected character Z following 'I'
tcpdump shows that the backend sends a packet with 'IZ' instead of'I\0' and then 'Z' as expected:
11:04:02.368669 localhost.5432 > localhost.1169: P 95281:95283(2) ack 985 win 32736 (DF)4500 002a 1166 4000 4006 2b66
7f000001    *E..*.f@.@.+f....*7f00 0001 1538 0491 d11a c949 0d6b 538b    *.....8.....I.kS.*5018 7fe0 d369 0000 495a
             *P....i..IZ      *
 
My patch fixes the problem but maybe there is a better way.

*** src/backend/tcop/dest.c.orig    Mon Apr 26 09:00:42 1999
--- src/backend/tcop/dest.c    Fri Apr 30 11:29:39 1999
***************
*** 336,342 ****              *        tell the fe that we saw an empty query string              * ----------------
         */
 
!             pq_putbytes("I", 1);             break;          case Local:
--- 336,342 ----              *        tell the fe that we saw an empty query string              * ----------------
         */
 
!             pq_putbytes("I\0", 2);             break;          case Local:


-- 
Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto               email: dz@cs.unitn.it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                             pgp: finger dz@tango.cs.unitn.it  |
+----------------------------------------------------------------------+


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Optimizer fed bad data about some system-table indexes
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] PostgreSQL Webpage