From: Teodor Sigaev Date: Mon, 19 Sep 2016 11:48:35 +0000 (+0300) Subject: support 9.5 X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=smlar.git;a=commitdiff_plain;h=5cb298d7226344342759d54fe32d72665315d372;hp=ce2bbfaebe7fc10f788870660c0b090e4e92115f support 9.5 --- diff --git a/smlar--1.0.sql b/smlar--1.0.sql index db361c0..fcce814 100644 --- a/smlar--1.0.sql +++ b/smlar--1.0.sql @@ -67,12 +67,12 @@ CREATE OR REPLACE FUNCTION inarray(anyarray, anyelement, float4, float4) CREATE OR REPLACE FUNCTION gsmlsign_in(cstring) RETURNS gsmlsign AS 'MODULE_PATHNAME' - LANGUAGE C STRICT; + LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION gsmlsign_out(gsmlsign) RETURNS cstring AS 'MODULE_PATHNAME' - LANGUAGE C STRICT; + LANGUAGE C IMMUTABLE; CREATE TYPE gsmlsign ( INTERNALLENGTH = -1, diff --git a/smlar_gin.c b/smlar_gin.c index 5ea1570..f43c9a5 100644 --- a/smlar_gin.c +++ b/smlar_gin.c @@ -1,3 +1,5 @@ +#include + #include "smlar.h" #include "fmgr.h" diff --git a/smlar_guc.c b/smlar_guc.c index f437774..d1cae32 100644 --- a/smlar_guc.c +++ b/smlar_guc.c @@ -209,9 +209,13 @@ set_smlar_limit(PG_FUNCTION_ARGS) /* init smlar guc */ initSmlarGUC(); - sprintf(buf,"%f", nlimit); - set_config_option("smlar.threshold", buf, - PGC_USERSET, PGC_S_SESSION ,GUC_ACTION_SET, true, 0); + sprintf(buf,"%f", nlimit); + set_config_option("smlar.threshold", buf, + PGC_USERSET, PGC_S_SESSION ,GUC_ACTION_SET, true, 0 +#if PG_VERSION_NUM >= 90500 + ,false +#endif + ); PG_RETURN_FLOAT4((float4)GetSmlarLimit()); }