Hi , As of now, we are using "\i" or using "PL/SH" script for getting the OS command results from PostgreSQL. However, below is the one more option where we can get the required info. Step 1 ====== #include "postgres.h" #include "fmgr.h" #include <string.h> #include <unistd.h> #ifdef PG_MODULE_MAGIC PG_MODULE_MAGIC; #endif PG_FUNCTION_INFO_V1(shell_exec); Datum shell_exec(PG_FUNCTION_ARGS) { text *arg1 = PG_GETARG_TEXT_P(0); char *Command=VARDATA(arg1); int32 result=system(Command); PG_RETURN_TEXT_P(result); } Step 2 ======= -bash-3.2$ more Makefile PG_CONFIG = /opt/PostgresPlus/9.0AS/bin/pg_config MODULES = shell_exec PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) Step 3 ====== make and .so file to $PGHOME/lib or $PGHOME/lib/postgres/ Step 4 ====== postgres=# CREATE OR REPLACE FUNCTION shell_exec(text)...