Skip to content

Commit e18e938

Browse files
committed
Convert 1C modules to extensions for simplifying windows builds.
1 parent 604fa07 commit e18e938

File tree

20 files changed

+741
-53
lines changed

20 files changed

+741
-53
lines changed

contrib/fasttrun/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
MODULE_big = fasttrun
2-
OBJS = fasttrun.o
3-
DATA_built = fasttrun.sql
2+
OBJS = fasttrun.o $(WIN32RES)
3+
EXTENSION = fasttrun
4+
DATA = fasttrun--1.0.sql
45
DOCS = README.fasttrun
56
REGRESS = fasttrun
7+
PGFIELDDESC = "fasttrun - functions to truncates the temporary table and doesn't grow pg_class size."
68

79
ifdef USE_PGXS
810
PGXS := $(shell pg_config --pgxs)

contrib/fasttrun/expected/fasttrun.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\set ECHO none
1+
CREATE EXTENSION fasttrun;
22
create table persist ( a int );
33
insert into persist values (1);
44
select fasttruncate('persist');
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
BEGIN;
2-
3-
41
CREATE OR REPLACE FUNCTION fasttruncate(text)
52
RETURNS void AS 'MODULE_PATHNAME'
63
LANGUAGE C RETURNS NULL ON NULL INPUT VOLATILE;
7-
8-
COMMIT;

contrib/fasttrun/fasttrun.control

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# fasttrun extension
2+
comment = 'Functions to truncates the temporary table and does not grow pg_class size'
3+
default_version = '1.0'
4+
module_pathname = '$libdir/fasttrun'
5+
relocatable = true

contrib/fasttrun/sql/fasttrun.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
\set ECHO none
2-
\i fasttrun.sql
3-
\set ECHO all
1+
CREATE EXTENSION fasttrun;
42

53
create table persist ( a int );
64
insert into persist values (1);

contrib/fulleq/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
MODULE_big = fulleq
22
OBJS = fulleq.o
3-
DATA_built = fulleq.sql
3+
EXTENSION = fulleq
4+
DATA = fulleq--1.0.sql
45
DOCS = README.fulleq
56
REGRESS = fulleq
7+
PGFIELDDESC = "fulleq - introduce operator == which returns true when operands are equal or both are nulls."
68

79
ARGTYPE = bool bytea char name int8 int2 int2vector int4 text \
810
oid xid cid oidvector float4 float8 abstime reltime macaddr \
911
inet cidr varchar date time timestamp timestamptz \
1012
interval timetz
1113

12-
EXTRA_CLEAN = fulleq.sql.in
14+
EXTRA_CLEAN = fulleq--1.0.sql
1315

1416
ifdef USE_PGXS
1517
PGXS := $(shell pg_config --pgxs)
@@ -21,7 +23,7 @@ include $(top_builddir)/src/Makefile.global
2123
include $(top_srcdir)/contrib/contrib-global.mk
2224
endif
2325

24-
fulleq.sql.in: fulleq.sql.in.in
26+
fulleq--1.0.sql: fulleq--1.0.sql.in
2527
echo 'BEGIN;' > $@
2628
echo 'SET search_path = public;' >> $@
2729
for type in $(ARGTYPE); \

contrib/fulleq/expected/fulleq.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\set ECHO none
1+
CREATE EXTENSION fulleq;
22
select 4::int == 4;
33
?column?
44
----------

0 commit comments

Comments
 (0)