diff --git a/META.json b/META.json index 5ea2bed..2e8c5bb 100644 --- a/META.json +++ b/META.json @@ -2,7 +2,7 @@ "name": "plpgsql_check", "abstract": "Additional tools for plpgsql functions validation", "description": "The plpgsql_check is PostgreSQL extension with functionality for direct or indirect extra validation of functions in plpgsql language. It verifies a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues.", - "version": "1.2.0", + "version": "1.2.1", "maintainer": "Pavel STEHULE ", "license": "bsd", "provides": { @@ -10,13 +10,13 @@ "abstract": "Additional tools for plpgsql functions validation", "file": "sql/plpgsql_check_active.sql", "docfile": "README.md", - "version": "1.2.0" + "version": "1.2.1" } }, "prereqs": { "runtime": { "requires": { - "PostgreSQL": "9.2.14", + "PostgreSQL": "9.3.10", "plpgsql": 0 } } diff --git a/Makefile b/Makefile index dadad00..c1fdc77 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ MODULE_big = plpgsql_check OBJS = plpgsql_check.o -DATA = plpgsql_check--1.0.sql plpgsql_check--1.1.sql plpgsql_check--1.0--1.1.sql plpgsql_check--1.2.sql plpgsql_check--1.1--1.2.sql +DATA = plpgsql_check--1.0--1.1.sql plpgsql_check--1.2.sql plpgsql_check--1.1--1.2.sql EXTENSION = plpgsql_check ifndef MAJORVERSION diff --git a/README.md b/README.md index 036107b..46a8c06 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ I invite any ideas, patches, bugreports plpgsql_check is next generation of plpgsql_lint. It allows to check source code by explicit call plpgsql_check_function. -PostgreSQL 9.2 is required, PostgreSQL 9.3, 9.4, 9.5, 9.6 and 10 are supported +PostgreSQL PostgreSQL 9.3, 9.4, 9.5, 9.6 and 10 are supported The SQL statements inside PL/pgSQL functions are checked by validator for semantic errors. These errors can be found by plpgsql_check_function: @@ -411,7 +411,7 @@ or compile by self: * gcc on Linux (against all supported PostgreSQL) * clang 3.4 on Linux (against PostgreSQL 9.5) -* for success regress tests the PostgreSQL 9.2.14, 9.3.10, 9.4.5, 9.5 or higher is required +* for success regress tests the PostgreSQL 9.3.10, 9.4.5, 9.5 or higher is required # Licence diff --git a/expected/plpgsql_check_active_1.out b/expected/plpgsql_check_active_2.out similarity index 94% rename from expected/plpgsql_check_active_1.out rename to expected/plpgsql_check_active_2.out index 14bfadf..e964e27 100644 --- a/expected/plpgsql_check_active_1.out +++ b/expected/plpgsql_check_active_2.out @@ -916,12 +916,12 @@ end; end $$ language plpgsql; select * from plpgsql_check_function('f1(int)'); - plpgsql_check_function --------------------------------------------------- + plpgsql_check_function +-------------------------------------------------------- warning:00000:4:DECLARE:unused variable "_f2" - warning extra:00000:unused parameter "$1" - warning extra:00000:unmodified OUT variable "$2" - warning extra:00000:unmodified OUT variable "$3" + warning extra:00000:unused parameter "_input1" + warning extra:00000:unmodified OUT variable "_output1" + warning extra:00000:unmodified OUT variable "_output2" (4 rows) drop function f1(int); @@ -1084,22 +1084,25 @@ $$ language plpgsql; select * from plpgsql_check_function('f1()', performance_warnings := true); plpgsql_check_function -------------------------------------------------------------------------------------- - performance:42804:7:assignment:target type is different type than source type - Detail: cast "unknown" value to "integer" type - Hint: Hidden casting can be a performance issue. + warning:42804:5:assignment:target type is different type than source type + Detail: cast "text" value to "integer" type + Hint: The input expression type does not have an assignment cast to the target type. + warning:42804:7:assignment:target type is different type than source type + Detail: cast "text" value to "integer" type + Hint: The input expression type does not have an assignment cast to the target type. warning:42804:8:assignment:target type is different type than source type Detail: cast "text" value to "integer" type Hint: The input expression type does not have an assignment cast to the target type. warning:42804:9:assignment:target type is different type than source type Detail: cast "date" value to "integer" type Hint: There are no possible explicit coercion between those types, possibly bug! - performance:42804:12:SQL statement:target type is different type than source type - Detail: cast "unknown" value to "integer" type - Hint: Hidden casting can be a performance issue. + warning:42804:12:SQL statement:target type is different type than source type + Detail: cast "text" value to "integer" type + Hint: The input expression type does not have an assignment cast to the target type. warning:42804:13:SQL statement:target type is different type than source type Detail: cast "text" value to "integer" type Hint: The input expression type does not have an assignment cast to the target type. -(15 rows) +(18 rows) drop function f1(); create or replace function f1() @@ -1134,9 +1137,12 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('f1()', performance_warnings := true); - plpgsql_check_function ------------------------- -(0 rows) + plpgsql_check_function +-------------------------------------------------------------------------------------- + warning:42804:3:RETURN:target type is different type than source type + Detail: cast "text" value to "integer" type + Hint: The input expression type does not have an assignment cast to the target type. +(3 rows) create or replace function f1() returns int as $$ @@ -1759,13 +1765,10 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fx()', performance_warnings := true); - plpgsql_check_function -------------------------------------------------------------------------------- - performance:42804:5:assignment:target type is different type than source type - Detail: cast "unknown" value to "text" type - Hint: Hidden casting can be a performance issue. + plpgsql_check_function +----------------------------------------------------------------------- error:42804:7:assignment:cannot cast composite value to a scalar type -(4 rows) +(1 row) drop function fx(); create or replace function fx() @@ -1831,9 +1834,12 @@ select * from test_t(); (1 row) select * from plpgsql_check_function('test_t()', performance_warnings := true); - plpgsql_check_function ------------------------- -(0 rows) + plpgsql_check_function +-------------------------------------------------------------------------------------- + warning:42804:3:assignment:target type is different type than source type + Detail: cast "text" value to "integer" type + Hint: The input expression type does not have an assignment cast to the target type. +(3 rows) create or replace function fx() returns void as $$ @@ -2064,12 +2070,9 @@ ERROR: cannot begin/end transactions in PL/pgSQL HINT: Use a BEGIN block with an EXCEPTION clause instead. CONTEXT: PL/pgSQL function fxx() line 3 at SQL statement select * from plpgsql_check_function('fxx()'); - plpgsql_check_function ------------------------------------------------------------------------ - error:0A000:3:SQL statement:cannot begin/end transactions in PL/pgSQL - Query: rollback - Hint: Use a BEGIN block with an EXCEPTION clause instead. -(3 rows) + plpgsql_check_function +------------------------ +(0 rows) drop function fxx(); create or replace function fxx() @@ -2105,10 +2108,10 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fxx(int, int)'); - plpgsql_check_function --------------------------------------------------- - warning extra:00000:unused parameter "$2" - warning extra:00000:unmodified OUT variable "$4" + plpgsql_check_function +------------------------------------------------- + warning extra:00000:unused parameter "b" + warning extra:00000:unmodified OUT variable "d" (2 rows) create or replace function fxx(in a int, in b int, out c int, out d int) @@ -2118,11 +2121,11 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fxx(int, int)'); - plpgsql_check_function --------------------------------------------------- - warning extra:00000:unused parameter "$1" - warning extra:00000:unused parameter "$2" - warning extra:00000:unmodified OUT variable "$4" + plpgsql_check_function +------------------------------------------------- + warning extra:00000:unused parameter "a" + warning extra:00000:unused parameter "b" + warning extra:00000:unmodified OUT variable "d" (3 rows) create type ct as (a int, b int); @@ -2133,12 +2136,12 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fxx(ct, ct)'); - plpgsql_check_function ------------------------------------------------------------------------- - warning extra:00000:unused parameter "$2" - warning extra:00000:composite OUT variable "$3" is not single argument - warning extra:00000:composite OUT variable "$4" is not single argument - warning extra:00000:unmodified OUT variable "$4" + plpgsql_check_function +----------------------------------------------------------------------- + warning extra:00000:unused parameter "b" + warning extra:00000:composite OUT variable "c" is not single argument + warning extra:00000:composite OUT variable "d" is not single argument + warning extra:00000:unmodified OUT variable "d" (4 rows) create or replace function fxx(a ct, b ct, OUT c ct, OUT d ct) @@ -2148,13 +2151,13 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fxx(ct, ct)'); - plpgsql_check_function ------------------------------------------------------------------------- - warning extra:00000:unused parameter "$1" - warning extra:00000:unused parameter "$2" - warning extra:00000:composite OUT variable "$3" is not single argument - warning extra:00000:composite OUT variable "$4" is not single argument - warning extra:00000:unmodified OUT variable "$4" + plpgsql_check_function +----------------------------------------------------------------------- + warning extra:00000:unused parameter "a" + warning extra:00000:unused parameter "b" + warning extra:00000:composite OUT variable "c" is not single argument + warning extra:00000:composite OUT variable "d" is not single argument + warning extra:00000:unmodified OUT variable "d" (5 rows) create or replace function tx(a int) @@ -2177,7 +2180,7 @@ select * from plpgsql_check_function('tx(int)'); warning extra:00000:5:statement block:variable "ax" shadows a previously defined variable Hint: SET plpgsql.extra_warnings TO 'shadowed_variables' warning:00000:2:DECLARE:unused variable "ax" - warning extra:00000:unused parameter "$1" + warning extra:00000:unused parameter "a" (6 rows) create type xt as (a int, b int, c int); @@ -2190,11 +2193,11 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fx_xt()'); - plpgsql_check_function --------------------------------------------------- + plpgsql_check_function +------------------------------------------------- warning:00000:2:DECLARE:unused variable "l" warning:00000:3:DECLARE:unused variable "a" - warning extra:00000:unmodified OUT variable "$1" + warning extra:00000:unmodified OUT variable "x" (3 rows) drop function fx_xt(); @@ -2223,14 +2226,14 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fx_xt()'); - plpgsql_check_function ------------------------------------------------------------------------- + plpgsql_check_function +----------------------------------------------------------------------- warning:00000:2:DECLARE:unused variable "c1" warning:00000:2:DECLARE:unused variable "c2" - warning extra:00000:composite OUT variable "$1" is not single argument - warning extra:00000:unmodified OUT variable "$1" - warning extra:00000:composite OUT variable "$2" is not single argument - warning extra:00000:unmodified OUT variable "$2" + warning extra:00000:composite OUT variable "x" is not single argument + warning extra:00000:unmodified OUT variable "x" + warning extra:00000:composite OUT variable "y" is not single argument + warning extra:00000:unmodified OUT variable "y" (6 rows) drop function fx_xt(); @@ -2244,12 +2247,12 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fx_xt()'); - plpgsql_check_function ------------------------------------------------------------------------- + plpgsql_check_function +----------------------------------------------------------------------- warning:00000:2:DECLARE:unused variable "c1" warning:00000:2:DECLARE:unused variable "c2" - warning extra:00000:composite OUT variable "$1" is not single argument - warning extra:00000:composite OUT variable "$2" is not single argument + warning extra:00000:composite OUT variable "x" is not single argument + warning extra:00000:composite OUT variable "y" is not single argument (4 rows) drop function fx_xt(); @@ -2260,11 +2263,11 @@ begin end; $$ language plpgsql; select * from plpgsql_check_function('fx_xt()'); - plpgsql_check_function ------------------------------------------------------------------------- - warning extra:00000:composite OUT variable "$1" is not single argument - warning extra:00000:unmodified OUT variable "$1" - warning extra:00000:unmodified OUT variable "$2" + plpgsql_check_function +----------------------------------------------------------------------- + warning extra:00000:composite OUT variable "x" is not single argument + warning extra:00000:unmodified OUT variable "x" + warning extra:00000:unmodified OUT variable "z" (3 rows) drop function fx_xt(); @@ -2533,4 +2536,36 @@ select * from plpgsql_check_function('fx()'); ------------------------ (0 rows) -drop function fx() +drop function fx(); +create function out1(OUT f1 int, OUT f2 int) +returns setof record as +$$ +begin + for f1, f2 in + execute $q$ select 1, 2 $q$ + loop + return next; + end loop; +end $$ language plpgsql; +select * from plpgsql_check_function('out1()'); + plpgsql_check_function +------------------------ +(0 rows) + +drop function out1(); +create function out1(OUT f1 int, OUT f2 int) +returns setof record as +$$ +begin + for f1, f2 in + select 1, 2 + loop + return next; + end loop; +end $$ language plpgsql; +select * from plpgsql_check_function('out1()'); + plpgsql_check_function +------------------------ +(0 rows) + +drop function out1(); diff --git a/plpgsql_check--1.0.sql b/plpgsql_check--1.0.sql deleted file mode 100644 index dd3b1a4..0000000 --- a/plpgsql_check--1.0.sql +++ /dev/null @@ -1,30 +0,0 @@ -LOAD 'plpgsql'; - -CREATE FUNCTION plpgsql_check_function_tb(funcoid regprocedure, - relid regclass DEFAULT 0, - fatal_errors boolean DEFAULT true, - others_warnings boolean DEFAULT true, - performance_warnings boolean DEFAULT false) -RETURNS TABLE(functionid regproc, - lineno int, - statement text, - sqlstate text, - message text, - detail text, - hint text, - level text, - "position" int, - query text, - context text) -AS 'MODULE_PATHNAME' -LANGUAGE C STRICT; - -CREATE FUNCTION plpgsql_check_function(funcoid regprocedure, - relid regclass DEFAULT 0, - format text DEFAULT 'text', - fatal_errors boolean DEFAULT true, - others_warnings boolean DEFAULT true, - performance_warnings boolean DEFAULT false) -RETURNS SETOF text -AS 'MODULE_PATHNAME' -LANGUAGE C STRICT; diff --git a/plpgsql_check--1.1.sql b/plpgsql_check--1.1.sql deleted file mode 100644 index f1094fd..0000000 --- a/plpgsql_check--1.1.sql +++ /dev/null @@ -1,70 +0,0 @@ -LOAD 'plpgsql'; - -CREATE FUNCTION __plpgsql_check_function_tb(funcoid regprocedure, - relid regclass, - fatal_errors boolean, - others_warnings boolean, - performance_warnings boolean) -RETURNS TABLE(functionid regproc, - lineno int, - statement text, - sqlstate text, - message text, - detail text, - hint text, - level text, - "position" int, - query text, - context text) -AS 'MODULE_PATHNAME','plpgsql_check_function_tb' -LANGUAGE C STRICT; - -CREATE FUNCTION __plpgsql_check_function(funcoid regprocedure, - relid regclass, - format text, - fatal_errors boolean, - others_warnings boolean, - performance_warnings boolean) -RETURNS SETOF text -AS 'MODULE_PATHNAME','plpgsql_check_function' -LANGUAGE C STRICT; - -CREATE FUNCTION plpgsql_check_function_tb(funcoid regprocedure, - relid regclass DEFAULT 0, - fatal_errors boolean DEFAULT true, - others_warnings boolean DEFAULT true, - performance_warnings boolean DEFAULT false) -RETURNS TABLE(functionid regproc, - lineno int, - statement text, - sqlstate text, - message text, - detail text, - hint text, - level text, - "position" int, - query text, - context text) -AS $$ -BEGIN - RETURN QUERY SELECT * FROM @extschema@.__plpgsql_check_function_tb(funcoid, relid, - fatal_errors, others_warnings, performance_warnings); - RETURN; -END; -$$ LANGUAGE plpgsql STRICT; - -CREATE FUNCTION plpgsql_check_function(funcoid regprocedure, - relid regclass DEFAULT 0, - format text DEFAULT 'text', - fatal_errors boolean DEFAULT true, - others_warnings boolean DEFAULT true, - performance_warnings boolean DEFAULT false) -RETURNS SETOF text -AS $$ -BEGIN - RETURN QUERY SELECT s FROM @extschema@.__plpgsql_check_function(funcoid, relid, - format, fatal_errors, others_warnings, - performance_warnings) g(s); - RETURN; -END; -$$ LANGUAGE plpgsql STRICT; diff --git a/postgresql10-plpgsql_check.spec b/postgresql10-plpgsql_check.spec index c4d0ff4..a10b23a 100644 --- a/postgresql10-plpgsql_check.spec +++ b/postgresql10-plpgsql_check.spec @@ -3,14 +3,14 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,8 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 - +%setup -q -n %{sname}-%{version} %build PATH="%{pginstdir}/bin;$PATH" ; export PATH @@ -43,11 +42,17 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control - %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables diff --git a/postgresql92-plpgsql_check.spec b/postgresql11-plpgsql_check.spec similarity index 76% rename from postgresql92-plpgsql_check.spec rename to postgresql11-plpgsql_check.spec index 5df9d25..91e0577 100644 --- a/postgresql92-plpgsql_check.spec +++ b/postgresql11-plpgsql_check.spec @@ -1,16 +1,16 @@ -%global pgmajorversion 92 -%global pginstdir /usr/pgsql-9.2 +%global pgmajorversion 11 +%global pginstdir /usr/pgsql-11 %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,7 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 +%setup -q -n %{sname}-%{version} %build @@ -43,11 +43,17 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control - %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables diff --git a/postgresql93-plpgsql_check.spec b/postgresql93-plpgsql_check.spec index 6110f4f..cc5ce5a 100644 --- a/postgresql93-plpgsql_check.spec +++ b/postgresql93-plpgsql_check.spec @@ -3,14 +3,14 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,7 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 +%setup -q -n %{sname}-%{version} %build @@ -43,11 +43,17 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control - %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables diff --git a/postgresql94-plpgsql_check.spec b/postgresql94-plpgsql_check.spec index 1fcb612..98fd42a 100644 --- a/postgresql94-plpgsql_check.spec +++ b/postgresql94-plpgsql_check.spec @@ -3,14 +3,14 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,7 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 +%setup -q -n %{sname}-%{version} %build @@ -43,11 +43,17 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control - %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables diff --git a/postgresql95-plpgsql_check.spec b/postgresql95-plpgsql_check.spec index 9071fa2..53690a5 100644 --- a/postgresql95-plpgsql_check.spec +++ b/postgresql95-plpgsql_check.spec @@ -3,14 +3,14 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,7 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 +%setup -q -n %{sname}-%{version} %build @@ -43,11 +43,17 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control - %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables diff --git a/postgresql96-plpgsql_check.spec b/postgresql96-plpgsql_check.spec index 1023e4b..3d6e4a7 100644 --- a/postgresql96-plpgsql_check.spec +++ b/postgresql96-plpgsql_check.spec @@ -3,14 +3,14 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation Group: Applications/Databases License: BSD -URL: https://github.com/okbob/plpgsql_check/archive/v1.2.0.zip -Source0: plpgsql_check-1.2.0.zip +URL: https://github.com/okbob/plpgsql_check/archive/v%{version}.zip +Source0: plpgsql_check-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql%{pgmajorversion}-devel @@ -23,7 +23,7 @@ a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. %prep -%setup -q -n %{sname}-1.2.0 +%setup -q -n %{sname}-%{version} %build @@ -43,11 +43,18 @@ rm -rf %{buildroot} %defattr(644,root,root,755) %doc README.md %{pginstdir}/lib/plpgsql_check.so -%{pginstdir}/share/extension/plpgsql_check--1.0.sql +%{pginstdir}/share/extension/plpgsql_check--1.2.sql +%{pginstdir}/share/extension/plpgsql_check--1.0--1.1.sql +%{pginstdir}/share/extension/plpgsql_check--1.1--1.2.sql %{pginstdir}/share/extension/plpgsql_check.control %changelog +* Fri Sep 15 2017 - Pavel STEHULE 1.2.1-1 +- missing RETURN detection +- fix some bugs and false alarms +- PostgreSQL 11 support + * Fri Now 11 2016 - Pavel STEHULE 1.2.0-1 - support extra warnings - shadowed variables