mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-29 07:07:18 +02:00
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
72 lines
1.2 KiB
Makefile
72 lines
1.2 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile --
|
|
#
|
|
# Makefile for new datetime module.
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
PGDIR = ../..
|
|
SRCDIR = $(PGDIR)/src
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
INCLUDE_OPT = -I./ \
|
|
-I$(SRCDIR)/ \
|
|
-I$(SRCDIR)/include \
|
|
-I$(SRCDIR)/port/$(PORTNAME)
|
|
|
|
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
|
|
|
|
MODNAME = datetime_functions
|
|
|
|
SQLDEFS = $(MODNAME).sql
|
|
|
|
MODULE = $(MODNAME)$(DLSUFFIX)
|
|
|
|
MODDIR = $(LIBDIR)/modules
|
|
|
|
SQLDIR = $(LIBDIR)/sql
|
|
|
|
all: module sql
|
|
|
|
module: $(MODULE)
|
|
|
|
sql: $(SQLDEFS)
|
|
|
|
install: $(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
|
|
cp -p $(MODULE) $(MODDIR)/
|
|
strip $(MODDIR)/$(MODULE)
|
|
cp -p $(SQLDEFS) $(SQLDIR)/
|
|
|
|
install-doc:
|
|
if [ -d "$(DOCDIR)" ]; then \
|
|
cp -p *.doc $(DOCDIR); \
|
|
else \
|
|
cp -p *.doc $(SQLDIR); \
|
|
fi
|
|
|
|
$(MODDIR):
|
|
mkdir -p $@
|
|
|
|
$(SQLDIR):
|
|
mkdir -p $@
|
|
|
|
%.sql: %.sql.in
|
|
sed "s|MODULE_PATHNAME|$(MODDIR)/$(MODULE)|" < $< > $@
|
|
|
|
.SUFFIXES: $(DLSUFFIX)
|
|
|
|
%$(DLSUFFIX): %.c
|
|
$(CC) $(CFLAGS) -shared -o $@ $<
|
|
|
|
depend dep:
|
|
$(CC) -MM $(INCLUDE_OPT) *.c >depend
|
|
|
|
clean:
|
|
rm -f *~ $(MODULE) $(MODNAME).sql
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
include depend
|
|
endif
|