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
ed11ccf4
Commit
ed11ccf4
authored
Mar 22, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comment-only query to return Null result set, rather than nothing.
Cleans up blank query handling to be more consistent.
parent
23ecb885
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
29 deletions
+20
-29
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+20
-29
No files found.
src/backend/tcop/postgres.c
View file @
ed11ccf4
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.31
8 2003/03/20 07:02:10
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.31
9 2003/03/22 04:23:34
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -927,6 +927,10 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
EndCommand
(
commandTag
,
dest
);
}
/* end loop over parsetrees */
/* No parsetree - return empty result */
if
(
!
parsetree_list
)
NullCommand
(
dest
);
/*
* Close down transaction statement, if one is open. (Note that this
* will only happen if the querystring was empty.)
...
...
@@ -1789,7 +1793,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.31
8 $ $Date: 2003/03/20 07:02:10
$
\n
"
);
puts
(
"$Revision: 1.31
9 $ $Date: 2003/03/22 04:23:34
$
\n
"
);
}
/*
...
...
@@ -1995,36 +1999,23 @@ PostgresMain(int argc, char *argv[], const char *username)
* 'Q' indicates a user query
*/
case
'Q'
:
if
(
strspn
(
parser_input
->
data
,
"
\t\r\n
"
)
==
parser_input
->
len
)
{
/*
* if there is nothing in the input buffer, don't
* bother trying to parse and execute anything; just
* send back a quick NullCommand response.
*/
if
(
IsUnderPostmaster
)
NullCommand
(
Remote
);
}
else
{
/*
* otherwise, process the input string.
*
* Note: transaction command start/end is now done within
* pg_exec_query_string(), not here.
*/
if
(
log_statement_stats
)
ResetUsage
();
/*
* otherwise, process the input string.
*
* Note: transaction command start/end is now done within
* pg_exec_query_string(), not here.
*/
if
(
log_statement_stats
)
ResetUsage
();
pgstat_report_activity
(
parser_input
->
data
);
pgstat_report_activity
(
parser_input
->
data
);
pg_exec_query_string
(
parser_input
,
whereToSendOutput
,
QueryContext
);
pg_exec_query_string
(
parser_input
,
whereToSendOutput
,
QueryContext
);
if
(
log_statement_stats
)
ShowUsage
(
"QUERY STATISTICS"
);
}
if
(
log_statement_stats
)
ShowUsage
(
"QUERY STATISTICS"
);
break
;
/*
...
...
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