Re: [HACKERS] Re: new MB patch and pg_type oid problem - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: [HACKERS] Re: new MB patch and pg_type oid problem
Date
Msg-id 199808250415.NAA18131@srapc451.sra.co.jp
Whole thread Raw
In response to Re: new MB patch and pg_type oid problem  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: new MB patch and pg_type oid problem  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
>Applied.

Thanks. But patches for src/backend/catalog/Makefile seems missing in
the current source tree. Please apply attached patches.

It also includes some corrections to src/backend/util/mb/wchar.c.
--
Tatsuo Ishii
t-ishii@sra.co.jp

----------------------------------------------------------------
Index: backend/catalog/Makefile
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/backend/catalog/Makefile,v
retrieving revision 1.12
diff -c -r1.12 Makefile
*** Makefile    1998/07/26 04:30:20    1.12
--- Makefile    1998/08/25 03:59:43
***************
*** 24,52 ****

  GENBKI= ./genbki.sh

- ifdef MULTIBYTE
  GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
-                   pg_database_mb.h pg_variable.h pg_shadow.h \
-                   pg_group.h pg_log.h \
-                  )
- else
- GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
                    pg_database.h pg_variable.h pg_shadow.h \
                    pg_group.h pg_log.h \
                   )
- endif

- ifdef MULTIBYTE
  LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
-                  pg_proc.h pg_type.h pg_attribute_mb.h pg_class_mb.h \
-                  pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
-                  pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
-                  pg_language.h pg_parg.h \
-                  pg_aggregate.h pg_ipl.h pg_inheritproc.h \
-                  pg_rewrite.h pg_listener.h pg_description.h indexing.h \
-                 )
- else
- LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
                   pg_proc.h pg_type.h pg_attribute.h pg_class.h \
                   pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
                   pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
--- 24,35 ----
***************
*** 54,60 ****
                   pg_aggregate.h pg_ipl.h pg_inheritproc.h \
                   pg_rewrite.h pg_listener.h pg_description.h indexing.h \
                  )
! endif
  global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
      sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description

--- 37,43 ----
                   pg_aggregate.h pg_ipl.h pg_inheritproc.h \
                   pg_rewrite.h pg_listener.h pg_description.h indexing.h \
                  )
!
  global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
      sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description

Index: backend/utils/mb/wchar.c
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/backend/utils/mb/wchar.c,v
retrieving revision 1.2
diff -c -r1.2 wchar.c
*** wchar.c    1998/08/24 01:14:01    1.2
--- wchar.c    1998/08/25 04:00:20
***************
*** 13,18 ****
--- 13,41 ----
   * supported in the client, you don't need to define
   * mb2wchar_with_len() function (SJIS is the case).
   */
+
+ /*
+  * SQL/ASCII
+  */
+ static void pg_ascii2wchar_with_len
+ (const unsigned char *from, pg_wchar *to, int len)
+ {
+   while (*from && len > 0) {
+     *to++ = *from++;
+     len--;
+   }
+   *to = 0;
+ }
+
+ static int pg_ascii_mblen(const unsigned char *s)
+ {
+   return(1);
+ }
+
+ /*
+  * EUC
+  */
+
  static void pg_euc2wchar_with_len
  (const unsigned char *from, pg_wchar *to, int len)
  {
***************
*** 316,322 ****
  }

  pg_wchar_tbl pg_wchar_table[] = {
!   {0, 0},
    {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
    {pg_euccn2wchar_with_len, pg_euccn_mblen},
    {pg_euckr2wchar_with_len, pg_euckr_mblen},
--- 339,345 ----
  }

  pg_wchar_tbl pg_wchar_table[] = {
!   {pg_ascii2wchar_with_len, pg_ascii_mblen},
    {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
    {pg_euccn2wchar_with_len, pg_euccn_mblen},
    {pg_euckr2wchar_with_len, pg_euckr_mblen},

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Open 6.4 items
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: new MB patch and pg_type oid problem