Monday, April 10, 2006

New Explain Format

Bruce has just added a new todo item.

- Allow EXPLAIN output to be more easily processed by scripts

I think the well-formed xml is a better format to express the tree structure of the explain output. I don't know xml can be processed easily by *scripts*, but it is easy for the utility programs using xml processing libraries. And xml elements can have many attributes which can be used to hold rows, cost and time parameters.

To switch between the human-readable format and xml format, we need another guc option; 'set explain_format = text' (of course, this is a default) and 'set explain_format = xml'.

I guess this is a good solution to provide explain information for the query utilities around PostgreSQL.

PL/Java 1.2.0 compilation error on PG8.0.0 or 8.0.1

According to the PL/Java release page, PL/Java 1.2.0 still has full support for 8.0.x.

However, PL/Java 1.2.0 can't be compiled with 8.0.0 or 8.0.1, because a number of arguments of DefineCustomIntVariable() has been changed between 8.0.1 and 8.0.2. So I got a following error on 8.0.1. PL/Java 1.2.0 can be compiled only on 8.0.2 or later.

Should it be fixed in future release?

gcc -c -Wno-long-long -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -fno-strict-aliasing -g -fpic -I"/usr/java/j2sdk1.4.2_04/include" -I"/usr/java/j2sdk1.4.2_04/include/linux" -DPKGLIBDIR=\"/home/snaga/pgsql801/lib\" -I/home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/include -I/home/snaga/PostgresForest/installer/build/pljava-1.2.0/build/jni -DPGSQL_MAJOR_VER=8 -DPGSQL_MINOR_VER=0 -I/home/snaga/pgsql801/include/server -I/home/snaga/pgsql801/include/internal -D_GNU_SOURCE /home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/pljava/Backend.c -o Backend.o
/home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/pljava/Backend.c: In function `initializeJavaVM':
/home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/pljava/Backend.c:567: warning: passing arg 6 of `DefineCustomIntVariable' makes pointer from integer without a cast
/home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/pljava/Backend.c:567: warning: passing arg 7 of `DefineCustomIntVariable' makes pointer from integer without a cast
/home/snaga/PostgresForest/installer/build/pljava-1.2.0/src/C/pljava/Backend.c:567: too many arguments to function `DefineCustomIntVariable'
make[1]: *** [Backend.o] Error 1
make[1]: Leaving directory `/home/snaga/PostgresForest/installer/build/pljava-1.2.0/build/objs'
make: *** [c_all] Error 2