aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 3fc8a2d8882..73be822a83e 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.235 2005/04/14 01:38:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.236 2005/04/28 21:47:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -238,7 +238,7 @@ QueryIsReadOnly(Query *parsetree)
if (parsetree->into != NULL)
return false; /* SELECT INTO */
else if (parsetree->rowMarks != NIL)
- return false; /* SELECT FOR UPDATE */
+ return false; /* SELECT FOR UPDATE/SHARE */
else
return true;
case CMD_UPDATE:
@@ -1663,7 +1663,12 @@ CreateQueryTag(Query *parsetree)
if (parsetree->into != NULL)
tag = "SELECT INTO";
else if (parsetree->rowMarks != NIL)
- tag = "SELECT FOR UPDATE";
+ {
+ if (parsetree->forUpdate)
+ tag = "SELECT FOR UPDATE";
+ else
+ tag = "SELECT FOR SHARE";
+ }
else
tag = "SELECT";
break;