The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation: not tested
1) There are some errors applying the patch against the current master: fabrizio@macanudo:/d/postgresql (master) $ git apply /tmp/schema-variables-poc-180429-01-diff /tmp/schema-variables-poc-180429-01-diff:2305: trailing whitespace. /tmp/schema-variables-poc-180429-01-diff:2317: indent with spaces. We can support UPDATE and SELECT commands on variables. /tmp/schema-variables-poc-180429-01-diff:2319: indent with spaces. possible syntaxes: /tmp/schema-variables-poc-180429-01-diff:2321: indent with spaces. -- there can be a analogy with record functions /tmp/schema-variables-poc-180429-01-diff:2322: indent with spaces. SELECT varname; warning: squelched 14 whitespace errors warning: 19 lines add whitespace errors. 2) There are some warnings when during build process schemavar.c:383:18: warning: expression which evaluates to zero treated as a null pointer constant of type 'HeapTuple' (aka 'struct HeapTupleData *') [-Wnon-literal-null-conversion] HeapTuple tp = InvalidOid; ^~~~~~~~~~ ../../../src/include/postgres_ext.h:36:21: note: expanded from macro 'InvalidOid' #define InvalidOid ((Oid) 0) ^~~~~~~~~ 1 warning generated. tab-complete.c:1268:21: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"VARIABLE", NULL, &Query_for_list_of_variables}, ^ tab-complete.c:1268:21: note: (near initialization for ‘words_after_create[48].vquery’) llvmjit_expr.c: In function ‘llvm_compile_expr’: llvmjit_expr.c:253:3: warning: enumeration value ‘EEOP_PARAM_SCHEMA_VARIABLE’ not handled in switch [-Wswitch] switch (opcode) ^