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
e41acf40
Commit
e41acf40
authored
Sep 01, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak prettyprinting rules for saner indenting of UNION, INTERSECT,
EXCEPT constructs.
parent
453c670b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+9
-13
No files found.
src/backend/utils/adt/ruleutils.c
View file @
e41acf40
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* back to source text
* back to source text
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.1
79 2004/08/29 05:06:49 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.1
80 2004/09/01 23:58:38 tgl
Exp $
*
*
* This software is copyrighted by Jan Wieck - Hamburg.
* This software is copyrighted by Jan Wieck - Hamburg.
*
*
...
@@ -2202,15 +2202,15 @@ get_setop_query(Node *setOp, Query *query, deparse_context *context,
...
@@ -2202,15 +2202,15 @@ get_setop_query(Node *setOp, Query *query, deparse_context *context,
{
{
case
SETOP_UNION
:
case
SETOP_UNION
:
appendContextKeyword
(
context
,
"UNION "
,
appendContextKeyword
(
context
,
"UNION "
,
-
PRETTYINDENT_STD
,
0
,
0
);
-
PRETTYINDENT_STD
,
PRETTYINDENT_STD
,
0
);
break
;
break
;
case
SETOP_INTERSECT
:
case
SETOP_INTERSECT
:
appendContextKeyword
(
context
,
"INTERSECT "
,
appendContextKeyword
(
context
,
"INTERSECT "
,
-
PRETTYINDENT_STD
,
0
,
0
);
-
PRETTYINDENT_STD
,
PRETTYINDENT_STD
,
0
);
break
;
break
;
case
SETOP_EXCEPT
:
case
SETOP_EXCEPT
:
appendContextKeyword
(
context
,
"EXCEPT "
,
appendContextKeyword
(
context
,
"EXCEPT "
,
-
PRETTYINDENT_STD
,
0
,
0
);
-
PRETTYINDENT_STD
,
PRETTYINDENT_STD
,
0
);
break
;
break
;
default:
default:
elog
(
ERROR
,
"unrecognized set op: %d"
,
elog
(
ERROR
,
"unrecognized set op: %d"
,
...
@@ -2220,7 +2220,7 @@ get_setop_query(Node *setOp, Query *query, deparse_context *context,
...
@@ -2220,7 +2220,7 @@ get_setop_query(Node *setOp, Query *query, deparse_context *context,
appendStringInfo
(
buf
,
"ALL "
);
appendStringInfo
(
buf
,
"ALL "
);
if
(
PRETTY_INDENT
(
context
))
if
(
PRETTY_INDENT
(
context
))
append
StringInfoChar
(
buf
,
'\n'
);
append
ContextKeyword
(
context
,
""
,
0
,
0
,
0
);
need_paren
=
!
IsA
(
op
->
rarg
,
RangeTblRef
);
need_paren
=
!
IsA
(
op
->
rarg
,
RangeTblRef
);
...
@@ -2869,22 +2869,18 @@ appendContextKeyword(deparse_context *context, const char *str,
...
@@ -2869,22 +2869,18 @@ appendContextKeyword(deparse_context *context, const char *str,
if
(
PRETTY_INDENT
(
context
))
if
(
PRETTY_INDENT
(
context
))
{
{
context
->
indentLevel
+=
indentBefore
;
context
->
indentLevel
+=
indentBefore
;
if
(
context
->
indentLevel
<
0
)
context
->
indentLevel
=
0
;
appendStringInfoChar
(
context
->
buf
,
'\n'
);
appendStringInfoChar
(
context
->
buf
,
'\n'
);
appendStringInfoSpaces
(
context
->
buf
,
appendStringInfoSpaces
(
context
->
buf
,
context
->
indentLevel
+
indentPlus
);
Max
(
context
->
indentLevel
,
0
)
+
indentPlus
);
}
appendStringInfoString
(
context
->
buf
,
str
);
appendStringInfoString
(
context
->
buf
,
str
);
if
(
PRETTY_INDENT
(
context
))
{
context
->
indentLevel
+=
indentAfter
;
context
->
indentLevel
+=
indentAfter
;
if
(
context
->
indentLevel
<
0
)
if
(
context
->
indentLevel
<
0
)
context
->
indentLevel
=
0
;
context
->
indentLevel
=
0
;
}
}
else
appendStringInfoString
(
context
->
buf
,
str
);
}
}
/*
/*
...
...
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