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
0832fb74
Commit
0832fb74
authored
May 30, 2005
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix longstanding oversight in ruleutils.c: it doesn't regurgitate
a FOR UPDATE clause, if one is present.
parent
cfd9be93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+23
-1
No files found.
src/backend/utils/adt/ruleutils.c
View file @
0832fb74
...
...
@@ -3,7 +3,7 @@
* back to source text
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.19
6 2005/05/27 00:57:49 neilc
Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.19
7 2005/05/30 01:57:27 tgl
Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -1919,6 +1919,28 @@ get_select_query_def(Query *query, deparse_context *context,
else
get_rule_expr
(
query
->
limitCount
,
context
,
false
);
}
/* Add the FOR UPDATE/SHARE clause if present */
if
(
query
->
rowMarks
!=
NIL
)
{
if
(
query
->
forUpdate
)
appendContextKeyword
(
context
,
" FOR UPDATE OF "
,
-
PRETTYINDENT_STD
,
PRETTYINDENT_STD
,
0
);
else
appendContextKeyword
(
context
,
" FOR SHARE OF "
,
-
PRETTYINDENT_STD
,
PRETTYINDENT_STD
,
0
);
sep
=
""
;
foreach
(
l
,
query
->
rowMarks
)
{
int
rtindex
=
lfirst_int
(
l
);
RangeTblEntry
*
rte
=
rt_fetch
(
rtindex
,
query
->
rtable
);
appendStringInfo
(
buf
,
"%s%s"
,
sep
,
quote_identifier
(
rte
->
eref
->
aliasname
));
sep
=
", "
;
}
}
}
static
void
...
...
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