From c70e87787fa5e1c96b23ffc031ca6a0da1add0a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Villemain?= Date: Mon, 26 Oct 2009 21:48:04 +0100 Subject: [PATCH] major bug : fctx was not reaffected after first call --- ChangeLog | 4 ++++ README.pgfincore | 3 ++- pgfincore.c | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 485b727..288dae5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +26/10/2009 Cédric Villemain + + * 0.3.2 - fix fctx init + 26/10/2009 Cédric Villemain * 0.3.1 - fix Makefile without PGXS diff --git a/README.pgfincore b/README.pgfincore index 57fea39..d22119a 100644 --- a/README.pgfincore +++ b/README.pgfincore @@ -1,5 +1,6 @@ Install: -export USE_PGXS=1 ; make clean ; make && sudo make install +export USE_PGXS=1 ; make clean ; make +su ; export USE_PGXS=1 ; make install Create the functions from the sql script (it should be in your contrib directory) psql mydb -f pgfincore.sql diff --git a/pgfincore.c b/pgfincore.c index f4a010d..e1ed1f4 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -126,6 +126,7 @@ pgfincore(PG_FUNCTION_ARGS) } funcctx = SRF_PERCALL_SETUP(); + fctx = funcctx->user_fctx; if (fctx->segcount == 0) snprintf(pathname, MAXPGPATH, "%s", -- 2.39.5