{"action":"created","issue":{"url":"https://api.github.com/repos/jconway/plr/issues/26","repository_url":"https://api.github.com/repos/jconway/plr","labels_url":"https://api.github.com/repos/jconway/plr/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/jconway/plr/issues/26/comments","events_url":"https://api.github.com/repos/jconway/plr/issues/26/events","html_url":"https://github.com/jconway/plr/issues/26","id":174922013,"number":26,"title":"pl/r does not run on Windows 10 64 bit and *new* hardware","user":{"login":"AndreMikulec","id":179626,"avatar_url":"https://avatars.githubusercontent.com/u/179626?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreMikulec","html_url":"https://github.com/AndreMikulec","followers_url":"https://api.github.com/users/AndreMikulec/followers","following_url":"https://api.github.com/users/AndreMikulec/following{/other_user}","gists_url":"https://api.github.com/users/AndreMikulec/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreMikulec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreMikulec/subscriptions","organizations_url":"https://api.github.com/users/AndreMikulec/orgs","repos_url":"https://api.github.com/users/AndreMikulec/repos","events_url":"https://api.github.com/users/AndreMikulec/events{/privacy}","received_events_url":"https://api.github.com/users/AndreMikulec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-09-03T23:02:22Z","updated_at":"2016-09-28T12:34:01Z","closed_at":null,"body":"\r\nI tried\r\n\r\n[Win64 plr.dll for Postgres 9.5.x, R-3.3.0 (plr-8.3.0.16)](http://www.joeconway.com/plr/plr-8.3.0.16-pg9.5-R3.3.0-win64.zip)\r\n\r\non \r\n\r\n```text\r\n PostgreSQL 9.5.2, compiled by Visual C++ build 1800, 64-bit\r\n```\r\nwith\r\n```text\r\nR version 3.3.1 (2016-06-21)  Platform: x86_64-w64-mingw32/x64 (64-bit)\r\n```\r\n\r\non a new-ish Windows 10 64 bit laptop that is only 18 months old.\r\n\r\nI am getting this error again.\r\n\r\n```r\r\npostgres=# select r_max(5,3);\r\nERROR:  could not open file \"base/12373/2663\": No such file or directory\r\nLINE 1: SELECT NULL FROM pg_catalog.pg_class WHERE relname 'plr_modules' AND relnamespace = 2200\r\n\r\n```\r\n\r\nSo, my 'old hardware' guess is wrong.\r\n\r\n[pl/r runs fine on Windows 7 64 bit](https://github.com/jconway/plr/issues/18)\r\n\r\n\r\nWhat is the easiest way ( or an easy way ) to try to debug this problem?\r\n"},"comment":{"url":"https://api.github.com/repos/jconway/plr/issues/comments/250153705","html_url":"https://github.com/jconway/plr/issues/26#issuecomment-250153705","issue_url":"https://api.github.com/repos/jconway/plr/issues/26","id":250153705,"user":{"login":"davecramer","id":406518,"avatar_url":"https://avatars.githubusercontent.com/u/406518?v=3","gravatar_id":"","url":"https://api.github.com/users/davecramer","html_url":"https://github.com/davecramer","followers_url":"https://api.github.com/users/davecramer/followers","following_url":"https://api.github.com/users/davecramer/following{/other_user}","gists_url":"https://api.github.com/users/davecramer/gists{/gist_id}","starred_url":"https://api.github.com/users/davecramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecramer/subscriptions","organizations_url":"https://api.github.com/users/davecramer/orgs","repos_url":"https://api.github.com/users/davecramer/repos","events_url":"https://api.github.com/users/davecramer/events{/privacy}","received_events_url":"https://api.github.com/users/davecramer/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T12:34:01Z","updated_at":"2016-09-28T12:34:01Z","body":"On 27 September 2016 at 18:09, AndreMikulec <notifications@github.com>\nwrote:\n\n> Seems to just show my user tables\n>\n> postgres=# \\d\n>           List of relations\n>  Schema |  Name   | Type  |  Owner--------+---------+-------+----------\n>  public | ct      | table | postgres\n>  public | mytable | table | postgres\n> (2 rows)\n>\n> postgres=# select count(*) from pg_catalog.pg_class;\n>  count-------\n>    323\n> (1 row)\n>\n> postgres=# select * from  pg_catalog.pg_class where relname like 'r\\_%'  order by 1;\n>     relname     | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace |----------------+--------------+---------+-----------+----------+-------+-------------+---------------+\n>  r_typename     |         2200 |   16588 |         0 |       10 |     0 |       16586 |             0 |\n>  r_version_type |         2200 |   16593 |         0 |       10 |     0 |       16591 |             0 |\n> (2 rows)\n>\n>\n> postgres=# select * from  pg_catalog.pg_class where relname like 'plr\\_%'  order by 1;\n>      relname      | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace |------------------+--------------+---------+-----------+----------+-------+-------------+---------------+\n>  plr_environ_type |         2200 |   16584 |         0 |       10 |     0 |       16582 |             0 |\n> (1 row)\n>\n> Maybe, for some reason, CREATE EXTENSION, is not creating those functions?\n>\n> From INSTALL.txt\n> plr-8.3.0.16-pg9.5-R3.3.0-win64_MAY_22_2016\n>\n> In the instructions below:\n>     PostgreSQL is installed to <pgdir>\n>     R is installed to <rdir>\n>\n> For example, these directories might be:\n>     <pgdir> = C:\\PostgreSQL\\9.4\n>     <rdir>  = C:\\R\\R-3.1.2\n>\n> I recommend you ensure there are no spaces in the pathname to either <pgdir> or <rdir>.\n> Correct quoting of pathnames with spaces is left as an exercise for the reader ;-)\n>\n> The following files are contained in this zip file:\n> ---------------------------------------------------\n> README.txt:         place in <pgdir>\\doc\\extension\n> plr.dll:            place in <pgdir>\\lib\n> plr.sql:            place in <pgdir>\\share\\extension\n> plr.control:            place in <pgdir>\\share\\extension\n> plr--8.3.0.14.sql       place in <pgdir>\\share\\extension\n> plr--unpackaged--8.3.0.16.sql   place in <pgdir>\\share\\extension\n>\n> Ensure the following environment variables are set *prior* to starting PostgreSQL:\n> ---------------------------------------------------\n> PATH=<pgdir>\\bin;<pgdir>\\lib;<rdir>\\bin\\x64;$PATH\n> R_HOME=<rdir>\n>\n> I have all of those files\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\share\\extension>dir plr*.*\n>  Volume in drive C has no label.\n>  Volume Serial Number is 04C6-B781\n>\n>  Directory of C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\share\\extension\n>\n> 09/16/2016  07:17 PM             2,893 plr--8.3.0.16.sql\n> 09/16/2016  07:17 PM             1,035 plr--unpackaged--8.3.0.16.sql\n> 09/16/2016  07:17 PM               171 plr.control\n> 09/16/2016  07:17 PM             2,854 plr.sql\n>                4 File(s)          6,953 bytes\n>                0 Dir(s)  116,514,676,736 bytes free\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\lib>dir plr*\n>  Volume in drive C has no label.\n>  Volume Serial Number is 04C6-B781\n>\n>  Directory of C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\lib\n>\n> 09/16/2016  07:17 PM         6,292,805 plr.dll\n> 09/12/2016  12:29 PM         6,292,805 plr_dll_CONSTANT_CHAR\n> 09/16/2016  12:06 PM         6,292,805 plr_dll_CONSTANT_CHAR_POINTER\n> 09/16/2016  06:23 PM         6,293,123 plr_dll_DEBUGRESULT_MYTABLE_MYINT\n> 09/16/2016  04:56 PM         6,293,123 plr_dll_DEBUGRESULT_SEL_1_EQ_0\n> 09/16/2016  04:25 PM         6,293,123 plr_dll_INITSTRINGINFO\n>                6 File(s)     37,757,784 bytes\n>                0 Dir(s)  116,514,676,736 bytes free\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\doc\\extension>dir\n>  Volume in drive C has no label.\n>  Volume Serial Number is 04C6-B781\n>\n>  Directory of C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\doc\\extension\n>\n> 09/12/2016  01:24 PM    <DIR>          .\n> 09/12/2016  01:24 PM    <DIR>          ..\n> 09/12/2016  07:45 AM             2,050 README.plr\n>                1 File(s)          2,050 bytes\n>                2 Dir(s)  116,430,069,760 bytes free\n>\n>\n>\n> The pgAdmin III, schema public functions shows this\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug\\doc\\extension>Notepad2 C:\\Users\\AnonymousUser\\Documents\\pgadmin.log\n>\n> SELECT pr.oid, pr.xmin, pr.*, pg_get_function_result(pr.oid) AS typname, typns.nspname AS typnsp, lanname, proargnames, pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals, pronargdefaults, proconfig,        pg_get_userbyid(proowner) as funcowner, description,\n> (SELECT array_agg(label) FROM pg_seclabels sl1 WHERE sl1.objoid=pr.oid) AS labels,\n> (SELECT array_agg(provider) FROM pg_seclabels sl2 WHERE sl2.objoid=pr.oid) AS providers\n>   FROM pg_proc pr\n>   JOIN pg_type typ ON typ.oid=prorettype\n>   JOIN pg_namespace typns ON typns.oid=typ.typnamespace\n>   JOIN pg_language lng ON lng.oid=prolang\n>   LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)\n>  WHERE proisagg = FALSE AND pronamespace = 2200::oid\n>    AND typname NOT IN ('trigger', 'event_trigger')\n>  ORDER BY proname;\n>\n>\n>   oid  | xmin |       proname       | pronamespace |-------+------+---------------------+--------------+\n>  16578 |  566 | install_rcmd        |         2200 |\n>  16590 |  566 | load_r_typenames    |         2200 |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>  16581 |  566 | plr_array_accum     |         2200 |\n>  16580 |  566 | plr_array_push      |         2200 |\n>  16574 |  566 | plr_call_handler    |         2200 |\n>  16585 |  566 | plr_environ         |         2200 |\n>  16598 |  566 | plr_get_raw         |         2200 |\n>  16597 |  566 | plr_set_display     |         2200 |\n>  16595 |  566 | plr_set_rhome       |         2200 |\n>  16579 |  566 | plr_singleton_array |         2200 |\n>  16596 |  566 | plr_unset_rhome     |         2200 |\n>  16576 |  566 | plr_version         |         2200 |\n>  16589 |  566 | r_typenames         |         2200 |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>        |      |                     |              |\n>  16594 |  566 | r_version           |         2200 |\n>        |      |                     |              |\n>        |      |                     |              |\n>  16577 |  566 | reload_plr_modules  |         2200 |\n> (15 rows)\n>\n> Checking and looking for 'plr_modules'. I have *not* found it in here.\n>\n> plr--8.3.0.16.sql\n> plr--unpackaged--8.3.0.16.sql\n> plr.sql\n>\n> plr.c talks about 'table plr_modules (if it exists)'\n> This does not seem immediately helpful.\n>\n> /* * plr_load_modules() - Load procedures from *                      table plr_modules (if it exists) * * The caller is responsible to ensure SPI has already been connected * DO NOT make this static --- it has to be callable by reload_plr_modules() */voidplr_load_modules(void)\n> {\n>     int             spi_rc;\n>     char           *cmd;\n>     int             i;\n>     int             fno;\n>     MemoryContext   oldcontext;\n>     char           *modulesSql;\n>\n>     /* switch to SPI memory context */\n>     SWITCHTO_PLR_SPI_CONTEXT(oldcontext);\n>\n>     /*     * Check if table plr_modules exists     */\n>     if (!haveModulesTable(plr_nspOid))\n>     {\n>         /* clean up if SPI was used, and regardless restore caller's context */\n>         CLEANUP_PLR_SPI_CONTEXT(oldcontext);\n>         return;\n>     }\n>\n>     /* plr_modules table exists -- get SQL code extract table's contents */\n>     modulesSql = getModulesSql(plr_nspOid);\n>\n>     /* Read all the row's from it in the order of modseq */\n>     spi_rc = SPI_exec(modulesSql, 0);\n>\n>     /* modulesSql no longer needed -- cleanup */\n>     pfree(modulesSql);\n>\n>     if (spi_rc != SPI_OK_SELECT)\n>         /* internal error */\n>         elog(ERROR, \"plr_init_load_modules: select from plr_modules failed\");\n>\n>     /* If there's nothing, no modules exist */\n>     if (SPI_processed == 0)\n>     {\n>         SPI_freetuptable(SPI_tuptable);\n>         /* clean up if SPI was used, and regardless restore caller's context */\n>         CLEANUP_PLR_SPI_CONTEXT(oldcontext);\n>         return;\n>     }\n>\n>     /*     * There is at least on module to load. Get the     * source from the modsrc load it in the R interpreter     */\n>     fno = SPI_fnumber(SPI_tuptable->tupdesc, \"modsrc\");\n>\n>     for (i = 0; i < SPI_processed; i++)\n>     {\n>         cmd = SPI_getvalue(SPI_tuptable->vals[i],\n>                             SPI_tuptable->tupdesc, fno);\n>\n>         if (cmd != NULL)\n>         {\n>             load_r_cmd(cmd);\n>             pfree(cmd);\n>         }\n>     }\n>     SPI_freetuptable(SPI_tuptable);\n>\n>     /* clean up if SPI was used, and regardless restore caller's context */\n>     CLEANUP_PLR_SPI_CONTEXT(oldcontext);\n> }\n>\n> In these files, no 'CREATE table' exists ....\n>\n> plr-8.3.0.16-pg9.5-R3.3.0-win64.zip (MAY_22_2016)\n>\n> plr.sql           (AS '$libdir/plr','plr_FUNCTION')\n>   ==\n> plr--8.3.0.16.sql (AS 'MODULE_PATHNAME','plr_FUNCTION')\n>\n> These files are exactly the same\n>\n> For the most part (with some exceptions), the text . . .\n>\n>   AS '$libdir/plr','plr_FUNCTION'\n>\n> is swapped out with\n>\n>   AS 'MODULE_PATHNAME','plr_FUNCTION'\n>\n> This is the same in the 10devel (SEP_11_2016) ( and plr )\n>\n> C:\\postgres-master_0ab9c56_debug\\contrib\\plr\\plr.sql\n> AND\n> C:\\postgres-master_0ab9c56_debug\\contrib\\plr\\plr--8.3.0.16.sql\n> BUT NOT IN\n> C:\\postgres-master_0ab9c56_debug\\contrib\\plr\\sql\\plr.sql\n>\n> C:\\postgres-master_0ab9c56_debug\\contrib\\plr\\sql\\plr.sql\n> does have the CREATE TABLE plr_modules like it 'must?'\n> (and plr\\sql\\plr.sql ist just a collection of (more) plr functions and a\n> 'test'? of plr )\n>\n> CREATE TABLE plr_modules (\n>\n>   modseq int4,\n>\n>   modsrc text\n>\n> );\n>\n> Comparing plr-8.3.0.16-pg9.4-win64/plr\n>\n> plr.sql           (AS '$libdir/plr','plr_FUNCTION')\n>   ==\n> plr--8.3.0.16.sql (AS 'MODULE_PATHNAME','plr_FUNCTION')\n>\n> Again,\n>\n> These files are exactly the same ( AND I did get pl/r in PostgreSQL 9.4 on\n> Windows to work )\n>\n> For the most part (with some exceptions), the text . . .\n>\n>   AS '$libdir/plr','plr_FUNCTION'\n>\n> is swapped out with\n>\n>   AS 'MODULE_PATHNAME','plr_FUNCTION'\n>\n> From SQL in sql/plr.sql,\n> I try to create/load/run some functions (create table/insert/reload is\n> done first)\n>\n> -- check versionSELECT plr_version();\n> -- make typenames available in the global namespaceselect load_r_typenames();\n> CREATE TABLE plr_modules (\n>   modseq int4,\n>   modsrc text\n> );INSERT INTO plr_modules VALUES (0, 'pg.test.module.load <-function(msg) {print(msg)}');select reload_plr_modules();\n> ---- plr_modules test--create or replace function pg_test_module_load(text) returns text as 'pg.test.module.load(arg1)' language 'plr';select pg_test_module_load('hello world');\n>\n> So, now I have data.\n>\n> postgres=# SELECT NULL FROM pg_catalog.pg_class WHERE relname = 'plr_modules' AND relnamespace = 2200;\n>\n>  ?column?----------\n>\n> (1 row)\n>\n>\n> postgres=# SELECT * FROM pg_catalog.pg_class WHERE relname = 'plr_modules' AND relnamespace = 2200;\n>\n>    relname   | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | relallvisible | reltoastrelid | relhasindex | relisshared | relpersistence | relkind | relnatts | relchecks | relhasoids | relhaspk\n> ey | relhasrules | relhastriggers | relhassubclass | relrowsecurity | relforcerowsecurity | relispopulated | relreplident | relfrozenxid | relminmxid | relacl | reloptions-------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+------------+------------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+--------------+------------+--------+------------\n>  plr_modules |         2200 |   16602 |         0 |       10 |     0 |       16600 |             0 |        0 |         0 |             0 |         16603 | f           | f           | p              | r       |        2 |         0 | f          | f\n>    | f           | f              | f              | f              | f                   | t              | d            |          569 |          1 |        |\n> (1 row)\n>\n>\n> postgres=# SELECT modseq, modsrc FROM public.plr_modules ORDER BY modseq;\n>  modseq |                      modsrc--------+--------------------------------------------------\n>       0 | pg.test.module.load <-function(msg) {print(msg)}\n> (1 row)\n>\n> I get a 'different' error.\n>\n> postgres=# select load_r_typenames();\n> ERROR:  could not open file \"base/12418/16600\": No such file or directory\n> CONTEXT:  SQL statement \"SELECT modseq, modsrc FROM public.plr_modules ORDER BY modseq\"\n> postgres=#\n>\n> Eventually, this error this returns\n>\n> postgres=# select load_r_typenames();\n> ERROR:  could not open file \"base/12418/1259\": No such file or directory\n> CONTEXT:  SQL statement \"SELECT NULL FROM pg_catalog.pg_class WHERE relname = 'plr_modules' AND relnamespace = 2200\"\n> postgres=#\n>\n> NOTE: SPI_execute in tablefunct.c works fine.\n>\n> contrib/tablefunc/tablefunct.c\n>\n> static HTAB *\n>\n> load_categories_hash(char *cats_sql, MemoryContext per_query_ctx)\n>\n>\n>   /* Retrieve the category name rows */\n>\n>   ret = SPI_execute(cats_sql, true, 0);\n>\n>\n> TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug/contrib\n> $ make -C tablefunc clean\n> make: Entering directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n> rm -f tablefunc.dll tablefunc.o win32ver.o\n> rm -rf results/ regression.diffs regression.out tmp_check/ log/\n> make: Leaving directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n>\n> TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug/contrib\n> $ make -C tablefunc all\n> make: Entering directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n> x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -Og -fno-omit-frame-pointer  -I. -I. -I\n> ../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  \"-I../../src/include/port/win32\"  -c -o tablefunc.o tablefunc.c\n> windres -i win32ver.rc -o win32ver.o --include-dir=../../src/include --include-dir=.\n> x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -Og -fno-omit-frame-pointer  -shared -s\n> tatic-libgcc -o tablefunc.dll tablefunc.o win32ver.o -Wl,--export-all-symbols -L../../src/port -L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import  -Wl,--as-needed -lm  -L../../src/backend -lpostgres\n> make: Leaving directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n>\n> TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug/contrib\n> $ make -C tablefunc install\n> make: Entering directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n> /bin/mkdir -p '/usr/local/pgsql_0ab9c56_debug/share/extension'\n> /bin/mkdir -p '/usr/local/pgsql_0ab9c56_debug/share/extension'\n> /bin/mkdir -p '/usr/local/pgsql_0ab9c56_debug/lib'\n> /bin/install -c -m 644 ./tablefunc.control '/usr/local/pgsql_0ab9c56_debug/share/extension/'\n> /bin/install -c -m 644 ./tablefunc--1.0.sql ./tablefunc--unpackaged--1.0.sql  '/usr/local/pgsql_0ab9c56_debug/share/extension/'\n> /bin/install -c -m 755  tablefunc.dll '/usr/local/pgsql_0ab9c56_debug/lib/'\n> make: Leaving directory `/c/postgres-master_0ab9c56_debug/contrib/tablefunc'\n>\n> TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug/contrib\n> $\n>\n> Then, from ...\n>\n> C:\\postgres-master_0ab9c56_debug\\contrib\\tablefunc\\sql\\tablefunc.sql\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug>cd \"C:\\postgres-master_0ab9c56_debug\\contrib\\tablefunc\"\n>\n> C:\\MinGW\\msys\\1.0\\local\\pgsql_0ab9c56_debug>chcp 1252 > nul && \"%PGSQL%\\bin\\psql.exe\"  -p 5434\n>\n> psql (10devel)\n> Type \"help\" for help.\n>\n> postgres=# select version();\n>                                                                       version----------------------------------------------------------------------------------------------------------------------------------------------------\n>  PostgreSQL 10devel on x86_64-w64-mingw32, compiled by x86_64-w64-mingw32-gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 6.2.0, 64-bit\n> (1 row)\n>\n> C:\\postgres-master_0ab9c56_debug\\contrib\\tablefunc>chcp 1252 > nul && \"%PGSQL%\\bin\\psql.exe\"  -p 5434\n> psql (10devel)\n> Type \"help\" for help.\n>\n> postgres=# \\ir sql/tablefunc.sql\n>\n> CREATE EXTENSION tablefunc;\n> CREATE EXTENSION\n> ...\n>  avg-----\n>  250\n> (1 row)\n> ...SELECT * FROM crosstab#('SELECT rowid, attribute, val FROM ...')\n> ...\n>\n>  row_name | category_1 | category_2----------+------------+------------\n>  test1    | val2       | val2\n>  test2    | val6       | val6\n>           | val10      | val10\n> (3 rows)\n> ...\n>  row_name | category_1 | category_2 | category_3----------+------------+------------+------------\n>  test1    | val2       | val2       | val3\n>  test2    | val6       | val6       | val7\n>           | val10      | val10      | val11\n> (3 rows)\n> ...\n> DROP TABLE\n> CREATE TABLE\n> INSERT 0 1\n> INSERT 0 1\n> INSERT 0 1\n> INSERT 0 1\n>  keyid | parent_keyid | level |  branch-------+--------------+-------+----------\n>     11 |              |     0 | 11\n>     10 |           11 |     1 | 11-10\n>    111 |           11 |     1 | 11-111\n>      1 |          111 |     2 | 11-111-1\n> (4 rows)\n>\n> Currently, I am using gdb and Code::Block to follow as you recommended.\n> Again, the code is getting so complicated after 50 stack levels deep, I am\n> having some difficulty following it anymore. I am trying to find some some\n> sort of automated 'stepping' mechanism or script. I need to to know exactly\n> where ( what function ) the the crash/error occurs. Does anyone know how to\n> do that?\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/jconway/plr/issues/26#issuecomment-250014066>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAYz9sltKzQ0-KxK-CLZElDq8emdC6_6ks5quZQggaJpZM4J0amQ>\n> .\n>\n\n\nHi Andre\n\n\nI applaud your tenacity. What I would do is put a breakpoint in ereport and\nwait until it gets called. This is where it outputs the error message.\n\nThanks,\n\nDave Cramer\n"}}
{"actor":{"display_login":"davecramer"}}