Is pg_credereum still mantained?
Hi,
does it work with PG 12.3? I'm looking for an extension to start a blockchain project public/private and want to integrate postgresql. thanks
hello there, is this project dead? I want to know as I would like to fork and use it thanks
btw, I tried to compile it with postgresql 13 and got compile error:
make[1]: Entering directory '/home/src/postgresql-13.0/contrib/pg_credereum'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -fPIC -Wno-declaration-after-statement -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_credereum.o pg_credereum.c -MMD -MP -MF .deps/pg_credereum.Po
pg_credereum.c: In function ‘make_json_from_row’:
pg_credereum.c:165:2: error: unknown type name ‘FunctionCallInfoData’; did you mean ‘FunctionCallInfoBaseData’?
165 | FunctionCallInfoData callFcinfo;
| ^~~~~~~~~~~~~~~~~~~~
| FunctionCallInfoBaseData
In file included from pg_credereum.c:17:
/usr/local/pgsql/include/server/fmgr.h:152:11: error: request for member ‘flinfo’ in something not a structure or union
152 | (Fcinfo).flinfo = (Flinfo);
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/fmgr.h:153:11: error: request for member ‘context’ in something not a structure or union
153 | (Fcinfo).context = (Context);
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/fmgr.h:154:11: error: request for member ‘resultinfo’ in something not a structure or union
154 | (Fcinfo).resultinfo = (Resultinfo);
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/fmgr.h:155:11: error: request for member ‘fncollation’ in something not a structure or union
155 | (Fcinfo).fncollation = (Collation);
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/fmgr.h:156:11: error: request for member ‘isnull’ in something not a structure or union
156 | (Fcinfo).isnull = false;
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/fmgr.h:157:11: error: request for member ‘nargs’ in something not a structure or union
157 | (Fcinfo).nargs = (Nargs);
| ^
pg_credereum.c:170:2: note: in expansion of macro ‘InitFunctionCallInfoData’
170 | InitFunctionCallInfoData(callFcinfo, NULL, 1, InvalidOid, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
pg_credereum.c:171:12: error: request for member ‘arg’ in something not a structure or union
171 | callFcinfo.arg[0] = heap_copy_tuple_as_datum(tuple, tupleDesc);
| ^
pg_credereum.c:172:12: error: request for member ‘argnull’ in something not a structure or union
172 | callFcinfo.argnull[0] = false;
| ^
pg_credereum.c:179:12: error: request for member ‘flinfo’ in something not a structure or union
179 | callFcinfo.flinfo = &callFlinfo;
| ^
pg_credereum.c:181:19: warning: passing argument 1 of ‘to_json’ from incompatible pointer type [-Wincompatible-pointer-types]
181 | result = to_json(&callFcinfo);
| ^~~~~~~~~~~
| |
| int *
In file included from pg_credereum.c:17:
/usr/local/pgsql/include/server/fmgr.h:193:43: note: expected ‘FunctionCallInfo’ {aka ‘struct FunctionCallInfoBaseData *’} but argument is of type ‘int *’
193 | #define PG_FUNCTION_ARGS FunctionCallInfo fcinfo
| ~~~~~~~~~~~~~~~~~^~~~~~
/usr/local/pgsql/include/server/utils/fmgrprotos.h:1873:22: note: in expansion of macro ‘PG_FUNCTION_ARGS’
1873 | extern Datum to_json(PG_FUNCTION_ARGS);
| ^~~~~~~~~~~~~~~~
pg_credereum.c: In function ‘credereum_sign_transaction’:
pg_credereum.c:364:58: warning: passing argument 5 of ‘SPI_execute_with_args’ from incompatible pointer type [-Wincompatible-pointer-types]
364 | ret = SPI_execute_with_args(query, 1, argtypes, values, nulls, true, 1);
| ^~~~~
| |
| _Bool *
In file included from pg_credereum.c:27:
/usr/local/pgsql/include/server/executor/spi.h:103:38: note: expected ‘const char *’ but argument is of type ‘_Bool *’
103 | Datum *Values, const char *Nulls,
| ~~~~~~~~~~~~^~~~~
pg_credereum.c:405:52: warning: passing argument 5 of ‘SPI_execute_with_args’ from incompatible pointer type [-Wincompatible-pointer-types]
405 | SPI_execute_with_args(query, 5, argtypes, values, nulls, false, 0);
| ^~~~~
| |
| _Bool *
In file included from pg_credereum.c:27:
/usr/local/pgsql/include/server/executor/spi.h:103:38: note: expected ‘const char *’ but argument is of type ‘_Bool *’
103 | Datum *Values, const char *Nulls,
| ~~~~~~~~~~~~^~~~~
pg_credereum.c: In function ‘collector_main’:
pg_credereum.c:619:2: error: too few arguments to function ‘BackgroundWorkerInitializeConnection’
619 | BackgroundWorkerInitializeConnection(databaseName, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from pg_credereum.c:30:
/usr/local/pgsql/include/server/postmaster/bgworker.h:143:13: note: declared here
143 | extern void BackgroundWorkerInitializeConnection(const char *dbname, const char *username, uint32 flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.global:920: pg_credereum.o] Error 1
make[1]: Leaving directory '/home/src/postgresql-13.0/contrib/pg_credereum'
make: *** [Makefile:95: all-pg_credereum-recurse] Error 2
If anyone can check it as I'm not a C guy thanks.