File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 88 * Darko Prenosil <Darko.Prenosil@finteh.hr>
99 * Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
1010 *
11- * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.59 2006/10/04 00:29:44 momjian Exp $
11+ * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.60 2006/10/19 19:53:03 tgl Exp $
1212 * Copyright (c) 2001-2006, PostgreSQL Global Development Group
1313 * ALL RIGHTS RESERVED;
1414 *
@@ -1640,7 +1640,10 @@ PG_FUNCTION_INFO_V1(dblink_current_query);
16401640Datum
16411641dblink_current_query (PG_FUNCTION_ARGS )
16421642{
1643- PG_RETURN_TEXT_P (GET_TEXT (debug_query_string ));
1643+ if (debug_query_string )
1644+ PG_RETURN_TEXT_P (GET_TEXT (debug_query_string ));
1645+ else
1646+ PG_RETURN_NULL ();
16441647}
16451648
16461649
Original file line number Diff line number Diff line change 1414 *
1515 *
1616 * IDENTIFICATION
17- * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.56 2006/10/04 00:29:51 momjian Exp $
17+ * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.57 2006/10/19 19:53:03 tgl Exp $
1818 *
1919 *-------------------------------------------------------------------------
2020 */
@@ -113,7 +113,7 @@ PerformCursorOpen(DeclareCursorStmt *stmt, ParamListInfo params)
113113 */
114114 PortalDefineQuery (portal ,
115115 NULL ,
116- pstrdup (debug_query_string ),
116+ debug_query_string ? pstrdup (debug_query_string ) : NULL ,
117117 "SELECT" , /* cursor's query is always a SELECT */
118118 list_make1 (query ),
119119 list_make1 (plan ),
You can’t perform that action at this time.
0 commit comments