Index: contrib/dblink/dblink.c =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/dblink.c,v retrieving revision 1.63 diff -c -r1.63 dblink.c *** contrib/dblink/dblink.c 6 Apr 2007 04:21:41 -0000 1.63 --- contrib/dblink/dblink.c 10 May 2007 01:57:30 -0000 *************** *** 1630,1652 **** PG_RETURN_TEXT_P(GET_TEXT(sql)); } - /* - * dblink_current_query - * return the current query string - * to allow its use in (among other things) - * rewrite rules - */ - PG_FUNCTION_INFO_V1(dblink_current_query); - Datum - dblink_current_query(PG_FUNCTION_ARGS) - { - if (debug_query_string) - PG_RETURN_TEXT_P(GET_TEXT(debug_query_string)); - else - PG_RETURN_NULL(); - } - - /************************************************************* * internal functions */ --- 1630,1635 ---- Index: contrib/dblink/dblink.h =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/dblink.h,v retrieving revision 1.18 diff -c -r1.18 dblink.h *** contrib/dblink/dblink.h 5 Jan 2007 22:19:17 -0000 1.18 --- contrib/dblink/dblink.h 10 May 2007 01:57:30 -0000 *************** *** 56,61 **** extern Datum dblink_build_sql_insert(PG_FUNCTION_ARGS); extern Datum dblink_build_sql_delete(PG_FUNCTION_ARGS); extern Datum dblink_build_sql_update(PG_FUNCTION_ARGS); - extern Datum dblink_current_query(PG_FUNCTION_ARGS); #endif /* DBLINK_H */ --- 56,60 ---- Index: contrib/dblink/dblink.sql.in =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/dblink.sql.in,v retrieving revision 1.11 diff -c -r1.11 dblink.sql.in *** contrib/dblink/dblink.sql.in 2 Sep 2006 21:11:15 -0000 1.11 --- contrib/dblink/dblink.sql.in 10 May 2007 01:57:30 -0000 *************** *** 140,150 **** AS 'MODULE_PATHNAME','dblink_build_sql_update' LANGUAGE C STRICT; - CREATE OR REPLACE FUNCTION dblink_current_query () - RETURNS text - AS 'MODULE_PATHNAME','dblink_current_query' - LANGUAGE C; - CREATE OR REPLACE FUNCTION dblink_send_query(text, text) RETURNS int4 AS 'MODULE_PATHNAME', 'dblink_send_query' --- 140,145 ---- Index: contrib/dblink/uninstall_dblink.sql =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/uninstall_dblink.sql,v retrieving revision 1.3 diff -c -r1.3 uninstall_dblink.sql *** contrib/dblink/uninstall_dblink.sql 11 Sep 2006 02:10:26 -0000 1.3 --- contrib/dblink/uninstall_dblink.sql 10 May 2007 01:57:30 -0000 *************** *** 1,5 **** - DROP FUNCTION dblink_current_query (); - DROP FUNCTION dblink_build_sql_update (text, int2vector, int4, _text, _text); DROP FUNCTION dblink_build_sql_delete (text, int2vector, int4, _text); --- 1,3 ---- Index: contrib/dblink/doc/misc =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/doc/misc,v retrieving revision 1.4 diff -c -r1.4 misc *** contrib/dblink/doc/misc 2 Sep 2006 21:11:15 -0000 1.4 --- contrib/dblink/doc/misc 10 May 2007 01:57:30 -0000 *************** *** 2,32 **** ================================================================== Name - dblink_current_query -- returns the current query string - - Synopsis - - dblink_current_query () RETURNS text - - Inputs - - None - - Outputs - - Returns text -- a copy of the currently executing query - - Example usage - - test=# select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1; - dblink_current_query - ----------------------------------------------------------------------------------------------------------------------------------------------------- - select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1; - (1 row) - - ================================================================== - Name - dblink_get_pkey -- returns the position and field names of a relation's primary key fields --- 2,7 ---- Index: contrib/dblink/expected/dblink.out =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/expected/dblink.out,v retrieving revision 1.19 diff -c -r1.19 dblink.out *** contrib/dblink/expected/dblink.out 1 Feb 2007 21:05:29 -0000 1.19 --- contrib/dblink/expected/dblink.out 10 May 2007 01:57:31 -0000 *************** *** 21,30 **** INSERT INTO foo VALUES (9,'j','{"a9","b9","c9"}'); -- misc utilities -- show the currently executing query ! SELECT 'hello' AS hello, dblink_current_query() AS query; hello | query ! -------+----------------------------------------------------------- ! hello | SELECT 'hello' AS hello, dblink_current_query() AS query; (1 row) -- list the primary key fields --- 21,30 ---- INSERT INTO foo VALUES (9,'j','{"a9","b9","c9"}'); -- misc utilities -- show the currently executing query ! SELECT 'hello' AS hello, current_query() AS query; hello | query ! -------+---------------------------------------------------- ! hello | SELECT 'hello' AS hello, current_query() AS query; (1 row) -- list the primary key fields Index: contrib/dblink/sql/dblink.sql =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/dblink/sql/dblink.sql,v retrieving revision 1.16 diff -c -r1.16 dblink.sql *** contrib/dblink/sql/dblink.sql 2 Sep 2006 21:11:15 -0000 1.16 --- contrib/dblink/sql/dblink.sql 10 May 2007 01:57:31 -0000 *************** *** 26,32 **** -- misc utilities -- show the currently executing query ! SELECT 'hello' AS hello, dblink_current_query() AS query; -- list the primary key fields SELECT * --- 26,32 ---- -- misc utilities -- show the currently executing query ! SELECT 'hello' AS hello, current_query() AS query; -- list the primary key fields SELECT * Index: doc/TODO =================================================================== RCS file: /projects/cvsroot/pgsql/doc/TODO,v retrieving revision 1.2180 diff -c -r1.2180 TODO *** doc/TODO 5 May 2007 15:40:01 -0000 1.2180 --- doc/TODO 10 May 2007 01:57:33 -0000 *************** *** 1436,1442 **** * Remove or relicense modules that are not under the BSD license, if possible * %Remove memory/file descriptor freeing before ereport(ERROR) * Acquire lock on a relation before building a relcache entry for it - * %Promote debug_query_string into a server-side function current_query() * Allow cross-compiling by generating the zic database on the target system * Improve NLS maintenance of libpgport messages linked onto applications * Allow ecpg to work with MSVC and BCC --- 1436,1441 ---- Index: doc/src/FAQ/TODO.html =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/FAQ/TODO.html,v retrieving revision 1.681 diff -c -r1.681 TODO.html *** doc/src/FAQ/TODO.html 5 May 2007 15:40:01 -0000 1.681 --- doc/src/FAQ/TODO.html 10 May 2007 01:57:34 -0000 *************** *** 1278,1284 ****