head	1.10;
access;
symbols
	REL7_0_PATCHES:1.7.0.2
	REL7_0:1.7
	REL6_5_PATCHES:1.5.0.2
	REL6_5:1.5
	REL6_4:1.4.0.2
	release-6-3:1.2;
locks; strict;
comment	@# @;


1.10
date	2000.06.19.13.53.15;	author momjian;	state dead;
branches;
next	1.9;

1.9
date	2000.06.15.18.54.42;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2000.05.29.05.44.25;	author tgl;	state Exp;
branches;
next	1.7;

1.7
date	2000.02.13.18.59.47;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	99.09.27.20.03.57;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	99.06.05.19.09.36;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	98.08.30.19.37.26;	author scrappy;	state Exp;
branches;
next	1.3;

1.3
date	98.04.22.04.13.45;	author scrappy;	state Exp;
branches;
next	1.2;

1.2
date	97.11.05.21.37.37;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	97.08.25.23.11.11;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.10
log
@Update to /contrib from Karel.
@
text
@@


1.9
log
@/contrib patch from Karel.
@
text
@@


1.8
log
@Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
@
text
@a0 66
#-------------------------------------------------------------------------
#
# Makefile --
#
#    Makefile for new datetime module.
#
#-------------------------------------------------------------------------

PGDIR = ../..
SRCDIR = $(PGDIR)/src

include $(SRCDIR)/Makefile.global

CFLAGS += -I. $(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 $(CFLAGS) *.c >depend

clean:
		rm -f *~ $(MODULE) $(MODNAME).sql

ifeq (depend,$(wildcard depend))
include depend
endif
@


1.7
log
@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
@
text
@d14 1
a14 6
INCLUDE_OPT =	-I./ \
		-I$(SRCDIR)/ \
		-I$(SRCDIR)/include \
		-I$(SRCDIR)/port/$(PORTNAME)

CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
d59 1
a59 1
		$(CC) -MM $(INCLUDE_OPT) *.c >depend
@


1.6
log
@Apply contrib patch from Massimo
@
text
@d14 4
a17 4
INCLUDE_OPT =	-I ./ \
		-I $(SRCDIR)/ \
		-I $(SRCDIR)/include \
		-I $(SRCDIR)/port/$(PORTNAME)
@


1.5
log
@Hi,

I have updated my contrib code for version 6.5. In the attachment you will
find the directories array, datetime, miscutil, string, tools and userlocks
which replace the corresponding directories under contrib.

In contrib/tools you will find some developement scripts which I use while
hacking the sources. I hope they will be useful for some other people.

I have also added a contrib/Makefile which tries to compile and install all
the contribs. Unfortunately many of them don't have a Makefile or don't
compile cleanly.

--
Massimo Dal Zotto
@
text
@d42 7
@


1.4
log
@
From: Massimo Dal Zotto <dz@@cs.unitn.it>

Here is a tar file the new directories, which substitute the old ones
in contrib. Please remove the old directories array, datetime, miscutil,
string and userlock before unpacking the tar file in contrib.

Note that as the modules are now installed in lib/modules I install all
my sql code in lib/sql. In my opinion also the other contributors should
follow these rules.
@
text
@d3 3
a5 2
# Makefile--
#    Makefile for new date/time functions.
d23 2
d35 1
a35 1
sql:		$(MODNAME).sql
d37 1
a37 1
install:	$(MODULE) $(MODDIR) $(SQLDIR)
d40 1
a40 1
		cp -p $(MODNAME).sql $(SQLDIR)/
@


1.3
log
@From: Jun Kuwamura <juk@@rccm.co.jp>

  This patch fix the Makefiles in contrib/{pginterface, spi,
miscutil, int8, ip_and_mac, sequence, soundex, string, userlock,
array, datetime} to install their modules in one directory(lib/modules/).
@
text
@d18 1
a18 13
CFLAGS += $(INCLUDE_OPT)

ifeq ($(PORTNAME), linux)
  ifdef LINUX_ELF
    ifeq ($(CC), gcc)
      CFLAGS += -fPIC
    endif
  endif
endif

ifeq ($(PORTNAME), i386_solaris)
  CFLAGS+= -fPIC
endif
d24 4
d34 10
a43 3
install:	$(MODULE)
		cp -p $(MODULE) $(LIBDIR)/modules
		cd $(LIBDIR)/modules; strip $(MODULE)
d46 1
a46 1
		sed "s|MODULE_PATHNAME|$(LIBDIR)/modules/$(MODULE)|" < $< > $@@
d57 1
a57 1
		rm -f $(MODULE) $(MODNAME).sql
@


1.2
log
@Update of contrib stuff from massimo.
@
text
@d43 2
a44 2
		cp -p $(MODULE) $(LIBDIR)
		cd $(LIBDIR); strip $(MODULE)
d47 1
a47 1
		sed "s|MODULE_PATHNAME|$(LIBDIR)/$(MODULE)|" < $< > $@@
d52 1
a52 1
		cc $(CFLAGS) -shared -o $@@ $<
@


1.1
log
@pg_passwd cleanup.
@
text
@d1 62
a62 12
D=/usr/postgres
P=$D/lib/datetime_functions.so
CFLAGS=-fpic -O -I../../src/include -I../../src/backend

all: $P datetime_functions.sql

$P:datetime_functions.o 
	ld -Bshareable -o $P datetime_functions.o 

datetime_functions.sql: datetime.prot
	sh datetime.prot $P
	psql -c "\idatetime_functions.sql" template1
@
