stringinfo_test.tar.bz2
application/octet-stream
Filename: stringinfo_test.tar.bz2
Type: application/octet-stream
Part: 0
stringinfo_test/ 0000775 0001750 0001750 00000000000 14737146205 014010 5 ustar t-ishii t-ishii stringinfo_test/stringinfo_test.control 0000664 0001750 0001750 00000000214 14737113000 020613 0 ustar t-ishii t-ishii comment = 'function for benchmarking makeStringInfo'
default_version = '1.0'
module_pathname = '$libdir/stringinfo_test'
relocatable = true
stringinfo_test/stringinfo_test.c 0000664 0001750 0001750 00000000504 14737142423 017372 0 ustar t-ishii t-ishii /* -*-pgsql-c-*- */
#include "postgres.h"
#include "funcapi.h"
PG_MODULE_MAGIC;
PG_FUNCTION_INFO_V1(stringinfo_test);
Datum
stringinfo_test(PG_FUNCTION_ARGS)
{
StringInfo s;
int n;
int i;
n = PG_GETARG_INT32(0);
for (i = 0; i < n; i++)
{
s = makeStringInfo();
destroyStringInfo(s);
}
PG_RETURN_VOID();
}
stringinfo_test/Makefile 0000664 0001750 0001750 00000000575 14737136014 015454 0 ustar t-ishii t-ishii MODULE_big = stringinfo_test
OBJS = \
$(WIN32RES) \
stringinfo_test.o
EXTENSION = stringinfo_test
DATA = stringinfo_test--1.0.sql
ifdef USE_PGXS
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/stringinfo_test
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
stringinfo_test/stringinfo_test--1.0.sql 0000664 0001750 0001750 00000000415 14737113337 020323 0 ustar t-ishii t-ishii -- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION stringinfo_test" to load this file. \quit
CREATE FUNCTION stringinfo_test(IN niteration int)
RETURNS void
AS 'MODULE_PATHNAME', 'stringinfo_test'
LANGUAGE C STRICT;