summaryrefslogtreecommitdiff
path: root/contrib/miscutil
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-02-13 18:59:53 +0000
committerBruce Momjian <bruce@momjian.us>2000-02-13 18:59:53 +0000
commita2226ad2373dcea5063fb8dafee1d52487be15cd (patch)
tree1b69a17c51bb0338af72f7a19f9ebee05cf11af6 /contrib/miscutil
parent77d31cf3c17070c38b6536fc8b8f264525930cda (diff)
downloadpostgresql-a2226ad2373dcea5063fb8dafee1d52487be15cd.tar.gz
contrib-array.patch
this is an old patch which I have already submitted and never seen in the sources. It corrects the datatype oids used in some iterator functions. This bug has been reported to me by many other people. contrib-datetime.patch some code contributed by Reiner Dassing <dassing@wettzell.ifag.de> contrib-makefiles.patch fixes all my contrib makefiles which don't work with some compilers, as reported to me by another user. contrib-miscutil.patch an old patch for one of my old contribs. contrib-string.patch a small change to the c-like text output functions. Now the '{' is escaped only at the beginning of the string to distinguish it from arrays, and the '}' is no more escaped. elog-lineno.patch adds the current lineno of CopyFrom to elog messages. This is very useful when you load a 1 million tuples table from an external file and there is a bad value somehere. Currently you get an error message but you can't know where is the bad data. The patch uses a variable which was declared static in copy.c. The variable is now exported and initialized to 0. It is always cleared at the end of the copy or at the first elog message or when the copy is canceled. I know this is very ugly but I can't find any better way of knowing where the copy fails and I have this problem quite often. plperl-makefile.patch fixes a typo in a makefile, but the error must be elsewhere because it is a file generated automatically. Please have a look. tprintf-timestamp.patch restores the original 2-digit year format, assuming that the two century digits don't carry much information and that '000202' is easier to read than 20000202. Being only a log file it shouldn't break anything. Please apply the patches before the next scheduled code freeze. I also noticed that some of the contribs don't compile correcly. Should we ask people to fix their code or rename their makefiles so that they are ignored by the top makefile? -- Massimo Dal Zotto
Diffstat (limited to 'contrib/miscutil')
-rw-r--r--contrib/miscutil/Makefile8
-rw-r--r--contrib/miscutil/misc_utils.c2
-rw-r--r--contrib/miscutil/misc_utils.h6
3 files changed, 10 insertions, 6 deletions
diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile
index fa3c99fa1d..fd0065b86e 100644
--- a/contrib/miscutil/Makefile
+++ b/contrib/miscutil/Makefile
@@ -11,10 +11,10 @@ SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
-INCLUDE_OPT = -I ./ \
- -I $(SRCDIR)/ \
- -I $(SRCDIR)/include \
- -I $(SRCDIR)/port/$(PORTNAME)
+INCLUDE_OPT = -I./ \
+ -I$(SRCDIR)/ \
+ -I$(SRCDIR)/include \
+ -I$(SRCDIR)/port/$(PORTNAME)
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c
index 21341dc73c..6745b5b8bb 100644
--- a/contrib/miscutil/misc_utils.c
+++ b/contrib/miscutil/misc_utils.c
@@ -121,6 +121,7 @@ active_listeners(text *relname)
return count;
}
+#ifdef USE_ASSERT_CHECKING
int
assert_enable(int val)
{
@@ -134,6 +135,7 @@ assert_test(int val)
return assertTest(val);
}
#endif
+#endif
/* end of file */
diff --git a/contrib/miscutil/misc_utils.h b/contrib/miscutil/misc_utils.h
index 61217244a2..139df3bc77 100644
--- a/contrib/miscutil/misc_utils.h
+++ b/contrib/miscutil/misc_utils.h
@@ -6,13 +6,15 @@ int backend_pid(void);
int unlisten(char *relname);
int max(int x, int y);
int min(int x, int y);
-int assert_enable(int val);
+int active_listeners(text *relname);
+#ifdef USE_ASSERT_CHECKING
+int assert_enable(int val);
#ifdef ASSERT_CHECKING_TEST
int assert_test(int val);
#endif
+#endif
-int active_listeners(text *relname);
#endif
/*