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
3a0d95d1
Commit
3a0d95d1
authored
May 11, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yawn ... still another place not quite ready for zero-column tables.
parent
fda15b35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/prep/prepunion.c
+15
-5
No files found.
src/backend/optimizer/prep/prepunion.c
View file @
3a0d95d1
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.1
09 2004/04/07 18:17:2
5 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.1
10 2004/05/11 22:43:5
5 tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -264,8 +264,11 @@ generate_union_plan(SetOperationStmt *op, Query *parse,
...
@@ -264,8 +264,11 @@ generate_union_plan(SetOperationStmt *op, Query *parse,
List
*
sortList
;
List
*
sortList
;
sortList
=
addAllTargetsToSortList
(
NULL
,
NIL
,
tlist
,
false
);
sortList
=
addAllTargetsToSortList
(
NULL
,
NIL
,
tlist
,
false
);
if
(
sortList
)
{
plan
=
(
Plan
*
)
make_sort_from_sortclauses
(
parse
,
sortList
,
plan
);
plan
=
(
Plan
*
)
make_sort_from_sortclauses
(
parse
,
sortList
,
plan
);
plan
=
(
Plan
*
)
make_unique
(
plan
,
sortList
);
plan
=
(
Plan
*
)
make_unique
(
plan
,
sortList
);
}
*
sortClauses
=
sortList
;
*
sortClauses
=
sortList
;
}
}
else
else
...
@@ -324,6 +327,13 @@ generate_nonunion_plan(SetOperationStmt *op, Query *parse,
...
@@ -324,6 +327,13 @@ generate_nonunion_plan(SetOperationStmt *op, Query *parse,
* correct output.
* correct output.
*/
*/
sortList
=
addAllTargetsToSortList
(
NULL
,
NIL
,
tlist
,
false
);
sortList
=
addAllTargetsToSortList
(
NULL
,
NIL
,
tlist
,
false
);
if
(
sortList
==
NIL
)
/* nothing to sort on? */
{
*
sortClauses
=
NIL
;
return
plan
;
}
plan
=
(
Plan
*
)
make_sort_from_sortclauses
(
parse
,
sortList
,
plan
);
plan
=
(
Plan
*
)
make_sort_from_sortclauses
(
parse
,
sortList
,
plan
);
switch
(
op
->
op
)
switch
(
op
->
op
)
{
{
...
@@ -519,9 +529,9 @@ generate_append_tlist(List *colTypes, bool flag,
...
@@ -519,9 +529,9 @@ generate_append_tlist(List *colTypes, bool flag,
* First extract typmods to use.
* First extract typmods to use.
*
*
* If the inputs all agree on type and typmod of a particular column, use
* If the inputs all agree on type and typmod of a particular column, use
* that typmod; else use -1.
* that typmod; else use -1.
(+1 here in case of zero columns.)
*/
*/
colTypmods
=
(
int32
*
)
palloc
(
length
(
colTypes
)
*
sizeof
(
int32
));
colTypmods
=
(
int32
*
)
palloc
(
length
(
colTypes
)
*
sizeof
(
int32
)
+
1
);
foreach
(
planl
,
input_plans
)
foreach
(
planl
,
input_plans
)
{
{
...
...
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