Bruce Momjian wrote:
> I see what happened. The author said he had made the change, but the
> patch didn't contain it:
>
> http://archives.postgresql.org/pgsql-patches/2007-05/msg00132.php
> > > FWIW I think you should still provide dblink_current_query, even if it's
> > >
> > > only a wrapper over current_query(), for backwards compatibility.
> >
> > Good point. Done as suggested (I think, or did you mean also the change
> > of instances to use current_query()?). Replaced dblink_current_query
> > with an SQL procedure wrapper, I assume that's the most efficient way of
> > doing it?
I have re-added it as an undocumented dblink SQL function.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: contrib/dblink/dblink.sql.in
===================================================================
RCS file: /cvsroot/pgsql/contrib/dblink/dblink.sql.in,v
retrieving revision 1.15
diff -c -c -r1.15 dblink.sql.in
*** contrib/dblink/dblink.sql.in 4 Apr 2008 16:57:21 -0000 1.15
--- contrib/dblink/dblink.sql.in 5 Apr 2008 02:23:39 -0000
***************
*** 163,168 ****
--- 163,173 ----
AS 'MODULE_PATHNAME','dblink_build_sql_update'
LANGUAGE C STRICT;
+ CREATE OR REPLACE FUNCTION dblink_current_query ()
+ RETURNS text
+ AS 'SELECT current_query()'
+ LANGUAGE SQL;
+
CREATE OR REPLACE FUNCTION dblink_send_query(text, text)
RETURNS int4
AS 'MODULE_PATHNAME', 'dblink_send_query'
Index: contrib/dblink/uninstall_dblink.sql
===================================================================
RCS file: /cvsroot/pgsql/contrib/dblink/uninstall_dblink.sql,v
retrieving revision 1.6
diff -c -c -r1.6 uninstall_dblink.sql
*** contrib/dblink/uninstall_dblink.sql 4 Apr 2008 16:57:21 -0000 1.6
--- contrib/dblink/uninstall_dblink.sql 5 Apr 2008 02:23:39 -0000
***************
*** 3,8 ****
--- 3,10 ----
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
+ 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);