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 8
8
* Darko Prenosil <Darko.Prenosil@finteh.hr>
9
9
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
10
10
*
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 $
12
12
* Copyright (c) 2001-2006, PostgreSQL Global Development Group
13
13
* ALL RIGHTS RESERVED;
14
14
*
@@ -1640,7 +1640,10 @@ PG_FUNCTION_INFO_V1(dblink_current_query);
1640
1640
Datum
1641
1641
dblink_current_query (PG_FUNCTION_ARGS )
1642
1642
{
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 ();
1644
1647
}
1645
1648
1646
1649
Original file line number Diff line number Diff line change 14
14
*
15
15
*
16
16
* 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 $
18
18
*
19
19
*-------------------------------------------------------------------------
20
20
*/
@@ -113,7 +113,7 @@ PerformCursorOpen(DeclareCursorStmt *stmt, ParamListInfo params)
113
113
*/
114
114
PortalDefineQuery (portal ,
115
115
NULL ,
116
- pstrdup (debug_query_string ),
116
+ debug_query_string ? pstrdup (debug_query_string ) : NULL ,
117
117
"SELECT" , /* cursor's query is always a SELECT */
118
118
list_make1 (query ),
119
119
list_make1 (plan ),
You can’t perform that action at this time.
0 commit comments