From 7f3630e270322240437ba1871e15c06a32fae704 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sun, 30 Aug 1998 19:39:01 +0000 Subject: [PATCH] sequence contrib directory removed, as already integrated into the main backend... --- contrib/sequence/Makefile | 62 ---------------------------- contrib/sequence/set_sequence.c | 41 ------------------ contrib/sequence/set_sequence.h | 9 ---- contrib/sequence/set_sequence.sql.in | 33 --------------- 4 files changed, 145 deletions(-) delete mode 100644 contrib/sequence/Makefile delete mode 100644 contrib/sequence/set_sequence.c delete mode 100644 contrib/sequence/set_sequence.h delete mode 100644 contrib/sequence/set_sequence.sql.in diff --git a/contrib/sequence/Makefile b/contrib/sequence/Makefile deleted file mode 100644 index ade134651d..0000000000 --- a/contrib/sequence/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile-- -# Makefile for new sequence functions. -# -#------------------------------------------------------------------------- - -PGDIR = ../.. -SRCDIR = $(PGDIR)/src - -include $(SRCDIR)/Makefile.global - -INCLUDE_OPT = -I ./ \ - -I $(SRCDIR)/ \ - -I $(SRCDIR)/include \ - -I $(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) - -ifeq ($(PORTNAME), linux) - ifdef LINUX_ELF - ifeq ($(CC), gcc) - CFLAGS += -fPIC - endif - endif -endif - -ifeq ($(PORTNAME), i386_solaris) - CFLAGS+= -fPIC -endif - -MODNAME = set_sequence - -MODULE = $(MODNAME)$(DLSUFFIX) - -all: module sql - -module: $(MODULE) - -sql: $(MODNAME).sql - -install: $(MODULE) - cp -p $(MODULE) $(LIBDIR)/modules - cd $(LIBDIR)/modules; strip $(MODULE) - -%.sql: %.sql.in - sed "s|MODULE_PATHNAME|$(LIBDIR)/modules/$(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 diff --git a/contrib/sequence/set_sequence.c b/contrib/sequence/set_sequence.c deleted file mode 100644 index 713421f822..0000000000 --- a/contrib/sequence/set_sequence.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * set_sequence.c -- - * - * Set a new sequence value. - * - * Copyright (c) 1996, Massimo Dal Zotto - */ - -#include "postgres.h" -#include "nodes/parsenodes.h" -#include "commands/sequence.h" - -#include "set_sequence.h" - -extern int setval(struct varlena * seqin, int4 val); - -int -set_currval(struct varlena * sequence, int4 nextval) -{ - return setval(sequence, nextval); -} - -int -next_id(struct varlena * sequence) -{ - return nextval(sequence); -} - -int -last_id(struct varlena * sequence) -{ - return currval(sequence); -} - -int -set_last_id(struct varlena * sequence, int4 nextval) -{ - return setval(sequence, nextval); -} - -/* end of file */ diff --git a/contrib/sequence/set_sequence.h b/contrib/sequence/set_sequence.h deleted file mode 100644 index 992adcc02b..0000000000 --- a/contrib/sequence/set_sequence.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SET_SEQUENCE_H -#define SET_SEQUENCE_H - -int set_currval(struct varlena * sequence, int4 nextval); -int next_id(struct varlena * sequence); -int last_id(struct varlena * sequence); -int set_last_id(struct varlena * sequence, int4 nextval); - -#endif diff --git a/contrib/sequence/set_sequence.sql.in b/contrib/sequence/set_sequence.sql.in deleted file mode 100644 index 0f1421b71b..0000000000 --- a/contrib/sequence/set_sequence.sql.in +++ /dev/null @@ -1,33 +0,0 @@ --- SQL code to define new sequence utilities - --- Set a new sequence value --- -create function set_currval(text, int4) returns int4 - as 'MODULE_PATHNAME' - language 'C'; - --- Increment the value of sequence --- --- select next_id('sequence_name'); --- -create function next_id(text) returns int4 - as 'MODULE_PATHNAME' - language 'C'; - --- Return the last value set for a sequence --- --- select last_id('sequence_name'); --- -create function last_id(text) returns int4 - as 'MODULE_PATHNAME' - language 'C'; - --- Set the current value of a sequence --- --- select set_last_id('sequence_name', 1); --- -create function set_last_id(text,int4) returns int4 - as 'MODULE_PATHNAME' - language 'C'; - --- end of file -- 2.40.0