Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1c175cd7
Commit
1c175cd7
authored
Jan 08, 2009
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert current_query() change to use debug_query_string again; add comment.
parent
ae3c0752
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+2
-3
src/backend/utils/adt/misc.c
src/backend/utils/adt/misc.c
+7
-3
No files found.
doc/src/sgml/func.sgml
View file @
1c175cd7
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.46
6 2009/01/07 21:48:15
momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.46
7 2009/01/08 00:13:21
momjian Exp $ -->
<chapter
id=
"functions"
>
<title>
Functions and Operators
</title>
...
...
@@ -11343,8 +11343,7 @@ postgres=# select * from unnest2(array[[1,2],[3,4]]);
<row>
<entry><literal><function>
current_query
</function></literal></entry>
<entry><type>
text
</type></entry>
<entry>
text of the currently executing query (might match
client-supplied query or be internal query string)
</entry>
<entry>
text of the currently executing query (might contain more than one statement)
</entry>
</row>
<row>
...
...
src/backend/utils/adt/misc.c
View file @
1c175cd7
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.
69 2009/01/07 21:48:15
momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.
70 2009/01/08 00:13:22
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -31,7 +31,6 @@
#include "storage/pmsignal.h"
#include "storage/procarray.h"
#include "utils/builtins.h"
#include "tcop/pquery.h"
#include "tcop/tcopprot.h"
#define atooid(x) ((Oid) strtoul((x), NULL, 10))
...
...
@@ -56,11 +55,16 @@ current_database(PG_FUNCTION_ARGS)
/*
* current_query()
* Expose the current query to the user (useful in stored procedures)
* We might want to use ActivePortal->sourceText someday.
*/
Datum
current_query
(
PG_FUNCTION_ARGS
)
{
PG_RETURN_TEXT_P
(
cstring_to_text
(
ActivePortal
->
sourceText
));
/* there is no easy way to access the more concise 'query_string' */
if
(
debug_query_string
)
PG_RETURN_TEXT_P
(
cstring_to_text
(
debug_query_string
));
else
PG_RETURN_NULL
();
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment